<span style="font-family: Arial, Helvetica, sans-serif; background-color: rgb(255, 255, 255);">1.css不区分大小写</span>
2.css字体单位px em rem(css3给出的),不是响应式的
body{
font-size: 62.5%;//默认是16px,10除以16*100%,改变默认值为10px
}
span{
font-size: 1.6em;//1.6*10=16px
}
这只是其中的一个例子,span的父元素是body时才是16px,em是相对父元素的尺寸大小
(需要转换的像素值/父元素的值)
rem是相对于根元素的(html)设置的
<span style="font-size:12px;">html{
font-size: 62.5%;//这样设置后li的值就是10px,否则为16px(因为他的父元素ul为16px)
}
body{
font-size: 62.5%;
}
span{
font-size: 1.6em;
}
ul{
font-size: 16px;
}
li{
font-size: 1rem;//浏览器IE-8以及以下不支持,所以要和px一起用,再加上font-size:10px就可以兼容了。</span>
<span style="font-size:12px;"> }</span>
3.transform 2D效果, 包括
translate(x,y)//x,y轴偏移量,rotate(旋转度数),scale(w,h)//宽高扩大和缩小的倍数
skew(做左右倾斜的度数,向上下倾斜的度数)
matrix(n,n,n,n,n,n) | Defines a 2D transformation, using a matrix of six values |
translate(x,y) | Defines a 2D translation, moving the element along the X- and the Y-axis |
translateX(n) | Defines a 2D translation, moving the element along the X-axis |
translateY(n) | Defines a 2D translation, moving the element along the Y-axis |
scale(x,y) | Defines a 2D scale transformation, changing the elements width and height |
scaleX(n) | Defines a 2D scale transformation, changing the element's width |
scaleY(n) | Defines a 2D scale transformation, changing the element's height |
rotate(angle) | Defines a 2D rotation, the angle is specified in the parameter |
skew(x-angle,y-angle) | Defines a 2D skew transformation along the X- and the Y-axis |
skewX(angle) | Defines a 2D skew transformation along the X-axis |
skewY(angle) | Defines a 2D skew transformation along the Y-axis |