CSS3

2018-04-14  本文已影响0人  jrg陈咪咪sunny

css3被划分为模块,最重要的几个模块包括:选择器、框模型、背景和边框、文本效果、2D/3D 转换、动画、多列布局、用户界面
选择器
框模型

背景和边框

border-radius、box-shadow、border-image、
background-size:规定背景图片的尺寸
background-origin:规定背景图片的定位区域
background-clip:规定背景的绘制区域

文本效果(常用)

text-shadow:设置文字阴影
word-wrap:强制换行
word-break
css3提出@font-face规则,规则中定义了font-family、font-weight、font-style、font-stretch、src、unicode-range

2/3D转换

transform:向元素应用2/3D转换
transition:过渡

动画

@keyframes规则:
animation、animation-name、animation-duration等

用户界面(常用)

box-sizing、resize

css3新增伪类

:nth-child()
:nth-last-child()
:only-child
:last-child
:nth-of-type()
:only-of-type()
:empty
:target 这个伪类允许我们选择基于URL的元素,如果这个元素有一个识别器(比如跟着一个#),那 么:target会对使用这个ID识别器的元素增加样式。
:enabled
:disabled
:checked
:not

上一篇 下一篇

猜你喜欢

热点阅读