transition-property是用來指定當元素其中一個屬性改變時執行transition效果: 所支持的屬性類型如下:
color
: 通過紅、綠、藍和透明度組件變換(每個數值處理)如:background-color,border-color
,color
,outline-color
等css屬性;length
: 真實的數字 如:word-spacing
,width
,vertical-align
,top
,right
,bottom
,left
,padding
,outline-width
,margin
,min-width
,min-height
,max-width
,max-height
,line-height
,height
,border-width
,border-spacing
,background-position
等屬性;percentage
:真實的數字 如:word-spacing
,width
,vertical-align
,top
,right
,bottom
,left
,padding
,outline-width
,margin
,min-width
,min-height
,max-width
,max-height
,line-height
,height
,border-width
,border-spacing
,background-position
等屬性;integer
離散步驟(整個數字),在真實的數字空間,以及使用floor()轉換為整數時發生 如:outline-offset
,z-index
等屬性;number
真實的(浮點型)數值,如:zoom
,opacity
,font-weight
,等屬性;transform
listrectangle
:通過x, y, width 和 height(轉為數值)變換,如:crop
visibility
: 離散步驟,在0到1數字范圍之內,0表示“隱藏”,1表示完全“顯示”,如:visibility
shadow
: 作用於color, x, y 和 blur(模糊)屬性,如:text-shadow
gradient
: 通過每次停止時的位置和顏色進行變化。它們必須有相同的類型(放射狀的或是線性的)和相同的停止數值以便執行動畫,如:background-image
- paint server (SVG): 只支持下面的情況:從
gradient
到gradient
以及color
到color
,然后工作與上面類似 - space-separated list of above:如果列表有相同的項目數值,則列表每一項按照上面的規則進行變化,否則無變化
- a shorthand property: 如果縮寫的所有部分都可以實現動畫,則會像所有單個屬性變化一樣變化