css3被劃分為模塊,最重要的幾個模塊包括:選擇器、框模型、背景和邊框、文本效果、2D/3D 轉(zhuǎn)換、動畫、多列布局、用戶界面
選擇器
框模型
背景和邊框
border-radius、box-shadow、border-image、
background-size:規(guī)定背景圖片的尺寸
background-origin:規(guī)定背景圖片的定位區(qū)域
background-clip:規(guī)定背景的繪制區(qū)域文本效果(常用)
text-shadow:設(shè)置文字陰影
word-wrap:強(qiáng)制換行
word-break
css3提出@font-face規(guī)則,規(guī)則中定義了font-family、font-weight、font-style、font-stretch、src、unicode-range2/3D轉(zhuǎn)換
transform:向元素應(yīng)用2/3D轉(zhuǎn)換
transition:過渡動畫
@keyframes規(guī)則:
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