CSS3新特性回顾

CSS3 介绍

开始实例

新特征简介

  1. 强大的CSS选择器
  2. 抛弃图片的视觉效果
  3. 盒模型变化(多列布局和弹性盒模型)
  4. 阴影效果
  5. Web字体和web Font 图标
  6. CSS33过渡与动画交互效果
  7. 媒体查询

查看浏览器份额

点我查看


伪类(Pesudo Classes)

(1)动态伪类选择器

实例

:link 设置a对象在未被访问前的样式表属性

:visited 设置a对象在其链接地址已被访问过时的样式表属性

:hover 设置对象在其鼠标悬停时的样式表属性

:active 设置对象在被用户激活(在鼠标点击与释放之间发生的事件)时的样式表属性

定义CSS时候的顺序不同,也会直接导致链接显示的效果不同。原因可能在于浏览器解释CSS时遵循的“就近原则”。正确的顺序:a:link、a:visited、a:hover、a:active

解释:

  • link:连接平常的状态
  • visited:连接被访问过之后
  • hover:鼠标放到连接上的时候
  • active:连接被按下的时候
(2)结构伪类选择器

实例

:first-child 选择某个元素第一个子元素

:last-child 选择某个元素最后一个子元素

:nth-child() 选择某个元素的一个或者多个特定的子元素

:nth-last-child 选择某个元素的一个或者多个特定的子元素,从这个元素的最后一个子元素开始算

:nth-of--type() 选择指定的元素

:nth-last-of--type() 选择指定的元素,从元素的最后一个开始计算

:first-of-type 选择一个上级元素下的第一个同类子元素

:last-of-type 选择一个上级元素下的最后一个同类子元素

:only-of-type 选择的是它父元素唯一一个子元素

:empty 选择的元素里面没有内容


伪元素

实例

CSS 伪元素用于向某些选择设置特殊效果

伪元素作用
:first-letter将特殊的样式添加到文本的首字母
:first-line将特殊的样式添加到文本的首行
:before在某些元素之前插入某些内容
:after在某些元素之后插入某些内容

CSS3 变形

(1)border-radius

半圆+标准写法

左上角开始,顺时针

实例
演示

半圆

.demo5{
    width: 100px;
    height: 200px;
    border: 1px solid #ccc;
    background: #f66;
    margin: 50px auto;
    border-radius: 0px 100px 100px 0px;                                 
}

(2)border

三角形+对话框

实例
演示

三角形

.triangle{
    border-top:100px solid #ccc;
    border-bottom:100px solid transparent;
    border-right:100px solid transparent;
    border-left:100px solid transparent;    
    width: 0;
    height: 0;                              
    margin: 50px auto;
}

实例
演示

对话框

<style>
.triangle-dialog{
    background: #6a6;
    margin: 50px auto;
    width: 300px;
    height: 25px;
    line-height: 25px;
    padding: 10px;
    border-radius: 6px;
    color:#fff;
    position: relative;         
}
.triangle-dialog::before{
    content:'';
    border-left: 0px solid #6a6;
    border-top: 10px solid transparent; 
    border-right: 10px solid #6a6;
    border-bottom: 10px solid transparent;  
    position: absolute;
    left: -10px;    
    top: 10px;          
}
</style>

html
<div class="triangle-dialog">
    你好!我是三角形对话框
</div>

(3)菱形和平行四边形

实例
演示

菱形

.diamond {
    width: 200px;
    height: 200px;
    background: #6a6;
    margin: 100px auto;
    -webkit-transform: rotate(-45deg);
    -ms-transform: rotate(-45deg);
    -o-transform: rotate(-45deg);
    transform: rotate(-45deg);
}

演示
平行四边形

.parallel{
    width: 200px;
    height: 200px;
    background: #6a6;
    margin: 100px auto;
    /*skew 倾斜(x, y)*/
    -webkit-transform: skew(20deg);
    -ms-transform: skew(20deg);
    -o-transform: skew(20deg);
    transform: skew(20deg);
}

(4)五角星和六角星

实例
演示

五角星


<style>
    #star{
        position: relative;
        width: 0;
        height: 0;
        border-bottom: 70px solid #f66;
        border-left: 100px solid transparent;
        border-right: 100px solid transparent;
        margin: 150px auto;
        -webkit-transform: rotate(35deg);
        -ms-transform: rotate(35deg);
        -o-transform: rotate(35deg);
        transform: rotate(35deg);
    }
    #star::before{
        position: absolute;
        top: -50px;
        left: -69px;
        content: '';
        width: 0;
        height: 0;
        border-bottom: 80px solid #f66;
        border-left: 30px solid transparent;
        border-right: 30px solid transparent;
        -webkit-transform: rotate(-35deg);
        -ms-transform: rotate(-35deg);
        -o-transform: rotate(-35deg);
        transform: rotate(-35deg);
    }
    #star::after{
        position: absolute;
        content: '';
        top: 4px;
        left: -105px;
        width: 0;
        height: 0;
        border-bottom: 70px solid #f66;
        border-left: 100px solid transparent;
        border-right: 100px solid transparent;
        -webkit-transform: rotate(-70deg);
        -ms-transform: rotate(-70deg);
        -o-transform: rotate(-70deg);
        transform: rotate(-70deg);
    }       
</style>


<div id="star"></div>

六角星

        #mogen-david{
            position: relative;
            width: 0;
            height: 0;
            border-bottom: 100px solid #f66;
            border-left: 50px solid transparent;
            border-right: 50px solid transparent;
            margin: 100px auto;
        }   
        #mogen-david::before{
            position: absolute;
            content: '';
            top: 30px;
            left: -50px;
            width: 0;
            height: 0;
            border-top: 100px solid #f66;
            border-left: 50px solid transparent;
            border-right: 50px solid transparent;
        }

(5)五边形和六边形

实例
演示

五边形

.pentagon{
    position: relative;
    margin: 100px auto;
    width: 54px;
    height: 0;
    border-top: 50px solid #f66;
    border-left: 18px solid transparent;
    border-right: 18px solid transparent;
}
.pentagon::after{
    content: '';
    position: absolute;
    top: -85px;
    left: -17px;
    width: 0;
    height: 0;
    border-bottom: 35px solid #f66;
    border-left: 45px solid transparent;
    border-right: 45px solid transparent;
}

六边形

.hexagon{
    position: relative;
    margin: 100px auto;
    width: 100px;
    height: 50px;
    background: #f66;
}   
.hexagon::before{
    content: '';
    top: -25px;
    position: absolute;
    width: 0;
    height: 0;
    border-bottom: 25px solid #f66;
    border-left: 50px solid transparent;
    border-right: 50px solid transparent;
}
.hexagon::after{
    content: '';
    top: 50px;
    position: absolute;
    width: 0;
    height: 0;
    border-top: 25px solid #f66;
    border-left: 50px solid transparent;
    border-right: 50px solid transparent;
}   

(6)心形和蛋边形

实例
演示

心形

// 无圆心
.hearts{
    position: relative;
    margin: 50px auto;
    width: 50px;
    height: 80px;
    background: #f66;
    border-top-right-radius: 25px;
    border-top-left-radius: 25px;
    -webkit-transform: rotate(-45deg);
    -ms-transform: rotate(-45deg);
    -o-transform: rotate(-45deg);
    transform: rotate(-45deg);
}
.hearts:before{
    position: absolute;
    content: '';
    top: 15px;
    left: 15px;
    width: 50px;
    height: 80px;
    background: #f66;
    border-top-right-radius: 25px;
    border-top-left-radius: 25px;
    -webkit-transform: rotate(90deg);
    -ms-transform: rotate(90deg);
    -o-transform: rotate(90deg);
    transform: rotate(90deg);
}

// 有圆心
.hearts1::before{
    position: absolute;
    left: 50px;
    content: '';
    margin: 50px auto;
    width: 50px;
    height: 80px;
    background: #f66;
    border-radius: 50px 40px 0 0;
    -webkit-transform-origin:0 100% ;
    -ms-transform-origin:0 100% ;
    -o-transform-origin:0 100% ;
    transform-origin:0 100% ;
    -webkit-transform: rotate(-45deg);
    -ms-transform: rotate(-45deg);
    -o-transform: rotate(-45deg);
    transform: rotate(-45deg);
}   
.hearts1::after{
    position: absolute;
    content: '';
    margin: 50px auto;
    width: 50px;
    height: 80px;
    background: #f66;
    border-radius: 50px 40px 0 0;
    -webkit-transform-origin:100% 100% ;
    -ms-transform-origin:100% 100% ;
    -o-transform-origin:100% 100% ;
    transform-origin:100% 100% ;
    -webkit-transform: rotate(45deg);
    -ms-transform: rotate(45deg);
    -o-transform: rotate(45deg);
    transform: rotate(45deg);
}

蛋形

.ogival{
    margin: 100px auto;
    width: 60px;
    height: 100px;
    background: #fa3;
    /*(x / y)*/
    border-radius: 50% 50% 50% 50% / 60% 60% 40% 40%;
}

(7)太极阴阳图

实例
演示

太极阴阳图

body{
    background: rgb(193, 193, 193);
}
.taiji{
    position: relative;
    margin: 200px auto;
    width: 200px;
    height: 400px;
    background: #fff;
    border-radius: 200px;
    border-left: 200px solid #000;
}
.taiji:before{
    position: absolute;
    left: -100px;
    content: '';
    width: 100px;
    height: 100px;
    border:50px solid #fff;
    background: #000;
    border-radius: 200px;
}   
.taiji:after{
    position: absolute;
    left: -100px;
    top: 200px;
    content: '';
    width: 100px;
    height: 100px;
    border:50px solid #000;
    background: #fff;
    border-radius: 200px;
}   

CSS3 色彩

透明背景图层

实例
演示

opacity : value

.show{
    margin: 50px auto;
    width: 200px;
    height: 200px;
    padding: 10px;
    text-align: center;
    opacity: 0.5;
    background: #fff;
    border-radius: 40px;
    -webkit-box-shadow: 3px 3px 5px #888;
    box-shadow: 3px 3px 5px #888;
}

颜色模式1

(1)rgba(R, G, B, A)

字母描述
R正整数 | 百分数
G正整数 | 百分数
B正整数 | 百分数
AAlpha 透明度 ( 0~1 )

(2)hsla(H, S, L, A)

字母描述
HHue(色调) ,红色:0 | 360,绿色:120,蓝色:240。 取值范围:0 ~ 360
SSaturation(饱和度)。取值范围:0.0% ~ 100.0%
LLightness(亮度)。取值范围:0.0% ~ 100.0%
AAlpha 透明度 ( 0~1 )

颜色模式2

实例
演示

#main{
    margin: 100px auto;
    width: 800px;
    clear:both;
}
#main li{
    list-style: none;
    width: 240px;
    padding: 1px;
    border:1px solid rgba(255,0,0,0);
    cursor: pointer;
}
#main li:hover{
    border:1px solid rgba(255,0,0,0.8);
}
#main li:hover .img img{

    opacity: 0.7;
}
.img img {
    width: 240px;
    -webkit-transition: all .5s;
    -o-transition: all .5s;
    transition: all .5s;
}
.goods_title{
    margin: 10px;
    height: 50px;
    color:#666;
    overflow: hidden;
}
.price{
    margin: 10px;
    color:#f00;
}

线性渐变

实例
演示

语法:linear-gradient( [ <point> || <angle> ,] ? <stop> , <stop> [,<stop>] * )

元素描述
<angle>用角度值指定渐变的方向(或角度)。to left (270deg) | to right (90deg) | to top(0deg) | to bottom(180deg) 分别代表渐变方向:右 -> 左,左 -> 右,下 -> 上,上 -> 下
<color-stop>用于指定渐变的起止颜色
<length>用长度值指定起止色位置。不允许负值
<percentage>用百分比指定起止色位置
<color>指定颜色
.demo{
    margin: 50px auto;
    width: 260px;
    height: 200px;
    border:1px solid black;
    background-image: linear-gradient(to left,orange 100px, green 160px,red 260px);
    /*或者*/
    background-image: linear-gradient(270deg,orange 100px, green 160px,red 260px);
    background-image: linear-gradient(to left,orange 20%, green 40%x,red 100%);
    /*加前缀*/
    background-image: -webkit-linear-gradient(70deg,orange 100px, green 160px,red 260px);
    background-image:-o-linear-gradient(70deg,orange 100px, green 160px,red 260px);
    background-image:linear-gradient(70deg,orange 100px, green 160px,red 260px);    
    
}

径向渐变

实例
演示

语法:radial-gradient( [<bg-position> || <angle>, ] ? [ <shape> || <size> ,] ? <color-stop> , <color-stop>[, <color-stop>]* )

/*circle 圆*/
.circle{
    background-image: radial-gradient(circle at right,orange,green);
}
/*ellipse 椭圆*/
.ellipse{
    background-image: radial-gradient(ellipse at right,orange,green);
}       
.circle{
    background-image: radial-gradient(circle at right top,orange,green);
}
.ellipse{
    background-image: radial-gradient(ellipse at right top,orange,green);
}   
/*x*/
.circle{
    background-image: radial-gradient(20px circle at center,orange,green);
}
/*x, y*/
.ellipse{
    background-image: radial-gradient(20px 30px ellipse at center,orange,green);
}

重复性渐变

实例
演示

.linear{
    width: 300px;   
    height: 300px;  
    margin: 20px auto;
    border:1px solid #ccc;  
    background-image: repeating-linear-gradient(orange 0px, green 40px,red 80px);
}
.circle{
    width: 300px;   
    height: 300px;  
    margin: 20px auto;
    border-radius: 50%;
    border:1px solid #ccc;  
    background-image: repeating-radial-gradient(orange 0px, green 30px,red 40px);
}

盒子阴影效果

实例
演示

语法:box-shadow : h-shadow v-shadow blur spread color inset;

元素描述必需
h-shadow水平阴影的位置。允许负值
v-shadow垂直阴影的位置。允许负值
blur模糊距离
spread阴影的尺寸
color阴影的颜色。
inset将外部阴影(outset)改为内部阴影

CSS3 过渡

制作缓慢变长的方形

实例
演示

简写语法:transition: property duration delay timing-function;

Transition属性描述
transition-property过渡属性(默认值为all)
transition-duration过渡持续时间(默认值为0s)
transition-timing-function过渡函数(默认值为ease函数)
transition-delay过渡延迟时间(默认值为0s)
.demo{
    width: 100px;
    height: 100px;
    background: pink;
    cursor: pointer;
    /*过渡时间*/
    -webkit-transition-duration: 2s;
    -o-transition-duration: 2s;
    transition-duration: 2s;
    /*过渡属性*/
    -webkit-transition-property: height width;
    -o-transition-property: height width;
    transition-property:  height width;
    /*延迟时间*/
    -webkit-transition-delay: 1s;
    -o-transition-delay: 1s;
    transition-delay: 1s;
    /*过渡函数*/
    -webkit-transition-timing-function: ease;
    -o-transition-timing-function: ease;
    transition-timing-function: ease;
    /*简写形式*/
    -webkit-transition: height width 2s 1s ease;
    -o-transition: height width 2s 1s ease;
    transition: height width 2s 1s ease;    
}
.demo:hover{
    /*边框跟颜色也可以渐变*/
    width: 300px;
    height: 150px;
    background: #f66;
    border-radius: 40%;
}

过渡的timing-function属性详解

实例

timing-function值描述
ease慢 -> 快 -> 慢
linear匀速
ease-in开始慢 结束快
ease-out开始快 结束慢
ease-in-out慢 -> 快 -> 慢
step-start无视过渡时间,延迟时间结束后直接变化

仿天猫类别过渡效果制作

实例
演示

.main{
    width: 200px;
    height: 200px;
    border: 1px solid #ccc;
    margin: 50px auto;
    font-family: 'Microsoft YaHei';
    cursor: pointer;
}
.main:hover img {
    right: 10px;
}
.m_title{
    text-align: left;
    font-size:20px;
    padding: 20px 10px 10px 10px;
}
.m_content{
    color:#11ccaa;
    padding: 0 10px 10px 10px;
}
.m_img{
    position: relative;
    text-align: right;
}
.m_img img{
    position: absolute;
    width: 100px;
    top: 0;
    right: 0;
    -webkit-transition: all 0.5s;
    -o-transition: all 0.5s;
    transition: all 0.5s;           
}

仿天猫专题过渡效果实例

实例
演示

.main{
    margin: 10px auto;
    width: 230px;
    border:1px solid #ccc;
    text-align: center;
    font-family: 'Microsoft YaHei';
    cursor: pointer;
}
.m_title{
    font-weight: 700;
    margin: 5px;
    font-size: 20px;
}
.m_content{
    color:#666;
    margin-bottom: 15px;
}
.main:hover img{
    -webkit-transform: scale(1.1);
    -ms-transform: scale(1.1);
    -o-transform: scale(1.1);
    transform: scale(1.1);
}
.m_img{
    position: relative;
    padding: 30px;
}
.m_img::before{
    position: absolute;
    content: '';
    top: 10px;
    left: 35px;
    width: 160px;
    height: 160px;
    background: #eee;
    border-radius: 50%;
    z-index: -1;
}
img{
    width: 120px;
    -webkit-transform: scale(1);
    -ms-transform: scale(1);
    -o-transform: scale(1);
    transform: scale(1);
    -webkit-transition: all 0.5s;
    -o-transition: all 0.5s;
    transition: all 0.5s;
}

CSS3 动画

动画中的@keyframes关键帧讲解

实例
演示

.rect{
    width: 100px;
    height: 100px;
    background: red;
    position: fixed;
    animation: myMove 2s infinite;
}
@keyframes myMove{
    0%{ top:0; left:20%;background:red; }
    25%{ top:0; left:80%; background:blue;}
    50%{ top:80%; left:80%; background:green;}
    75%{ top:80%; left:20%;background:black; }
    100%{ top:0; left:20%; background:red;}
}

动画animation符合属性讲解

实例

/*指定动画名字*/
-webkit-animation-name: myMove;
-o-animation-name: myMove;
animation-name: myMove;
/*动画延续时间*/
-webkit-animation-duration: 1s;
-o-animation-duration: 1s;
animation-duration: 1s;
/*动画运动函数*/
-webkit-animation-timing-function: ease;
-o-animation-timing-function: ease;
animation-timing-function: ease;
/*动画延迟时间*/
-webkit-animation-delay: 1s;
-o-animation-delay: 1s;
animation-delay: 1s;
/*动画循环次数(infinite 无限循环)*/
-webkit-animation-iteration-count: 3;
-o-animation-iteration-count: 3;
animation-iteration-count: 3;
/*动画顺序 normal|alternate*/
-webkit-animation-direction: alternate;
-o-animation-direction: alternate;
animation-direction: alternate;
动画综合实例制作-loading加载动画制作

实例
演示

.spinner{
    margin: 100px auto;
    width: 60px;
    height: 60px;
    text-align: center;
    font-size:10px;
}
.spinner > div{
    background: #67cf22;
    height: 100%;
    width: 6px;
    display: inline-block;
    animation:myMove 1.2s infinite ease-in-out;
}
.spinner > div:nth-child(2){
    -webkit-animation-delay: -1.1s;
    -o-animation-delay: -1.1s;
    animation-delay: -1.1s;
}       
.spinner > div:nth-child(3){
    -webkit-animation-delay: -1s;
    -o-animation-delay: -1s;
    animation-delay: -1s;
}       
.spinner > div:nth-child(4){
    -webkit-animation-delay: -0.9s;
    -o-animation-delay: -0.9s;
    animation-delay: -0.9;
}       
.spinner > div:nth-child(5){
    -webkit-animation-delay: -0.8s;
    -o-animation-delay: -0.8s;
    animation-delay: -0.8;
}
@keyframes myMove{
    0%,40%,100%{-webkit-transform: scaleY(0.4);
    -ms-transform: scaleY(0.4);
    -o-transform: scaleY(0.4);
    transform: scaleY(0.4);}            
    20%{-webkit-transform: scaleY(1);
    -ms-transform: scaleY(1);
    -o-transform: scaleY(1);
    transform: scaleY(1);}
}
Loading动画效果实例2

实例
演示

.spinner{
    width: 60px;
    height: 60px;
    position: relative;
    margin: 100px auto;
}
.spinner > div{
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    border-radius: 50%;
    background: #67cf22;
    opacity: 0.6;
    animation: myLoading 2s infinite ease-in-out;
}
.spinner > div:nth-child(2){
    -webkit-animation-delay: -1s;
    -o-animation-delay: -1s;
    animation-delay: -1s;
}
@keyframes myLoading{
    0% ,100%{ transform: scale(0.0); }
    50% { transform: scale(1); }
}

CSS3 文字排版

制作发光字,立体字,苹果字体

实例
演示

语法:text-shadow: h-shadow v-shadow blur color;

制作发光字立体字苹果字体

body{
    background: #666;
    text-align: center;
    font: 700 55px 'Microsoft YaHei'
}
.font1{
    color:#fff;
    text-shadow: 2px 2px 3px #000;
}
.font2{
    color:#fff;
    text-shadow: 0 0 20px red;
}
.font3{
    text-shadow: 0 1px 1px #fff;
}       
.font4{
    color:#fff;
    text-shadow: 1px 1px 0px rgba(197,223,248,0.8),
                 2px 2px 0px rgba(197,223,248,0.8),
                 3px 3px 0px rgba(197,223,248,0.8),
                 4px 4px 0px rgba(197,223,248,0.8),
                 5px 5px 0px rgba(197,223,248,0.8),
                 6px 6px 0px rgba(197,223,248,0.8);

}

用text-overflow解决文字排版问题

实例
演示

语法:text-overflow:clip|ellipsis|string;

用text-overflow解决文字排版问题

.demo{
    margin: 30px auto;
    width: 100px;
    padding: 10px;
    border:1px solid #ccc;
    height: 50px;
    /*clip 需要overflow:hidden支持,但是不加clip只要overflow:hidden却也可以实现效果*/
    text-overflow:clip; 
    overflow: hidden;

}       
.demo1{
    margin: 30px auto;
    width: 100px;
    padding: 10px;
    border:1px solid #ccc;
    height: 50px;
    
    -webkit-text-overflow:ellipsis; 
    text-overflow:ellipsis;
    overflow: hidden;
    /*关键 出现省略号 不换行*/
    white-space: nowrap;
}

新的字体单位rem

px/em/rem换算地址
演示

元素特点描述
px它是一个绝对尺寸单位,是不能变动的像素单位 。 是显示屏上显示的每一个小点,为显示的最小单位。
em1.em的值并不是固定不变的。2.em会继承父级元素字体的大小rem描述相对于应用在当前元素的字体尺寸,所以它也是相对长度单位,可以变动。一般浏览器字体大小默认为16px,则2em == 32px
rem相对于应用<html>根元素的字体尺寸 。1. 它是描述相对于当前根元素字体尺寸,除了描述对象与em不同其余都和em一样 。 2.如果要对网页根元素字体大小进行修改,需要在<html>标签中加上style="font-size:value"属性

转载于:https://www.cnblogs.com/lbh2018/p/About_CSS3.html

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
### 回答1: CSS88是一本经典的CSS参考手册,它是CSS的早期版本,被广泛用于前端开发。作为初学者或者想要回顾基础知识的开发者,CSS88是一个不错的选择。 CSS88手册首先介绍了CSS的基本概念和语法,包括选择器、属性和属性值等。通过阅读手册,可以了解如何在HTML文档中使用CSS来控制页面的样式。手册还提供了丰富的示例代码,可以帮助读者更好地理解和应用这些概念。 CSS88手册还包含了大量常用的CSS属性和属性值的详细说明,如文本样式、盒模型、浮动、定位等。每个属性都有清晰的解释和用法示例,使开发者能够快速掌握各种样式的应用方法。 此外,CSS88手册还介绍了如何使用CSS编写响应式布局和动画效果。响应式设计是现代Web开发中的一个重要概念,能够使网页在不同设备上呈现出最佳的布局和样式。而CSS动画则给网页添加了更多的交互性和生动性,使用户体验更加丰富。 尽管CSS88是早期版本的参考手册,但它提供了一个坚实的CSS基础,并且其中的很多概念和技术在当前的CSS3版本中仍然适用。因此,对于想要了解CSS基础知识或者需要回顾基础知识的开发者来说,CSS88仍然是一个非常有价值的参考资料。 ### 回答2: CSS88是一个CSS规范的版本,它于1988年发布,是CSS(层叠样式表)的最早的标准之一。由于当时浏览器的功能和技术限制,CSS88的特性相对较少,不能满足现代化网页设计的需求。随着浏览器的发展,CSS3作为CSS的最新版本,引入了许多新的特性和功能,使得网页设计更加灵活和丰富。 CSS3参考手册是一个提供CSS3语法和属性的参考资源。它通常包含了详细说明每个CSS3属性的用法、取值范围和兼容性信息等。参考手册有助于开发者在需要时快速查找和理解CSS3的特性,从而更好地应用到网页设计中。 在CSS3参考手册中,你可以找到各种各样的CSS3特性,包括但不限于: 1. CSS3选择器:新增了众多选择器,如属性选择器、子元素选择器、相邻选择器等,有助于通过更精确的选择器选取目标元素。 2. 边框和背景:CSS3引入了新的边框样式和圆角属性,还可以使用渐变颜色、背景图像大小调整等。 3. 盒模型:添加了更多的盒模型属性,如盒阴影、透明度、角度旋转等。 4. 文字效果:可以添加文字阴影、文字渐变、文字特效等。 5. 过渡和动画:引入了过渡和动画效果的属性,使得页面元素可以平滑变化或动起来。 6. 媒体查询:允许开发者根据设备的宽度、高度、屏幕分辨率等特性来应用不同的样式。 总之,CSS3参考手册是一个有助于开发者更好地学习和应用CSS3的工具,它提供了详实的信息和示例,能够帮助开发者在网页设计中灵活运用CSS3新特性,实现丰富多样的页面效果。 ### 回答3: CSS3参考手册是一本关于CSS3语法和属性的详细指南。CSS3是CSS的第三个主要版本,引入了许多新的特性和属性,使网页设计更加灵活和强大。 在CSS3参考手册中,可以找到关于CSS3语法的详细说明和示例代码。这包括选择器、盒模型、文本样式、背景效果、边框样式、动画和过渡效果等。每个属性都有一个详细的解释,以及其兼容性和浏览器支持情况的说明。在手册中,还可以找到一些常见的CSS3用法和技巧,可以帮助开发者更好地利用CSS3来设计网页。 CSS3参考手册对于学习和掌握CSS3非常有帮助。它可以作为一个全面的指南,帮助开发者了解每个CSS3属性的功能和用法。通过参考手册,开发者可以轻松地查找和理解CSS3属性和语法,以及它们对网页设计的影响。手册中的示例代码也能够帮助开发者更好地理解CSS3的应用。 总而言之,CSS3参考手册是学习和使用CSS3的宝贵资源。它提供了关于CSS3属性的详细说明和示例代码,帮助开发者更好地理解和应用CSS3。无论是初学者还是有经验的开发者,都可以从参考手册中获得帮助,提高他们的CSS3技能水平。

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值