您尚未登录,无法添加相关文章。 - 登录

新用户?

哎呀,出了点小问题,您可以稍后重试!

未填写内容或格式不正确!

CSS3 transition-property使用参考指南

浏览:34077

相关技术文章博览

我要添加++

基础知识(由张鑫旭整理编辑)[我要纠错]

语法:

transition-property : none | all | [ <IDENT> ] [ ',' <IDENT> ]*

相关属性transition-durationtransition-timing-functiontransition-delay

属性类型:
color:
通过红、绿、蓝和透明度组件变换(每个数值处理)
length:
真实的数字
percentage:
真实的数字
integer
离散步骤(整个数字),在真实的数字空间,以及使用floor()转换为整数时发生
number
真实的(浮点型)数值
transform list:
详情请参阅:[CSS3-2D-TRANSFORMS]
rectangle:
通过x, y, width 和 height(转为数值)变换
visibility:
离散步骤,在0到1数字范围之内,0表示“隐藏”,1表示完全“显示”
shadow:
作用于color, x, y 和 blur(模糊)属性
gradient:
通过每次停止时的位置和颜色进行变化。它们必须有相同的类型(放射状的或是线性的)和相同的停止数值以便执行动画
paint server (SVG):
只支持下面的情况:从gradient到gradient以及color到color,然后工作与上面类似
space-separated list of above:
如果列表有相同的项目数值,则列表每一项按照上面的规则进行变化,否则无变化
a shorthand property:
如果缩写的所有部分都可以实现动画,则会像所有单个属性变化一样变化
说明:
属性名类型
background-colorcolor
background-imageonly gradients
background-positionpercentage, length
border-bottom-colorcolor
border-bottom-widthlength
border-colorcolor
border-left-colorcolor
border-left-widthlength
border-right-colorcolor
border-right-widthlength
border-spacinglength
border-top-colorcolor
border-top-widthlength
border-widthlength
bottomlength, percentage
colorcolor
croprectangle
font-sizelength, percentage
font-weightnumber
grid-*various
heightlength, percentage
leftlength, percentage
letter-spacinglength
line-heightnumber, length, percentage
margin-bottomlength
margin-leftlength
margin-rightlength
margin-toplength
max-heightlength, percentage
max-widthlength, percentage
min-heightlength, percentage
min-widthlength, percentage
opacitynumber
outline-colorcolor
outline-offsetinteger
outline-widthlength
padding-bottomlength
padding-leftlength
padding-rightlength
padding-toplength
rightlength, percentage
text-indentlength, percentage
text-shadowshadow
toplength, percentage
vertical-alignkeywords, length, percentage
visibilityvisibility
widthlength, percentage
word-spacinglength, percentage
z-indexinteger
zoomnumber
兼容性:
类型 IEInternet Explorer FirefoxFirefox ChromeChrome OperaOpera SafariSafari
版本 (×)IE6 (×)Firefox 2.0 (?)Chrome 1.0.x (×)Opera 9.63 (√)Safari 3.1
(×)IE7 (×)Firefox 3.0 (√)Chrome 2.0.x (√)Safari 4
(×)IE8 (×)Firefox 3.5
 

代码与实例

CSS代码:
transition_property{
    -webkit-transform:rotate(10deg);
    -webkit-transition-property:all; 
    -webkit-transition-duration:0.5s; 
    -webkit-transition-timing-function:ease-in;
}
transition_property:hover{
    -webkit-transform:rotate(40deg);
}
                
HTML代码:
<img class="transition_property" src="http://image.zhangxinxu.com/image/study/s/s128/mm1.jpg" />
                
效果截图
CSS3 transition-property效果截图
查看demo原页面>>

拓展知识点(由各前端同仁提供)

尚未添加拓展知识点!我来添加++
图片地址是:取消
插入:

我要分享

分享到:1