查看: 3864|回复: 0
上一主题 下一主题

CSS3中Transition属性详解以及示例分享

80572

主题

0

好友

积分

离线 发信

跳转到指定楼层
楼主
发表于 2017-03-10 21:49 | 只看该作者 | 倒序浏览

1transition-property璇
[css]
transition-property :all(灞ф瑰) || [attr] (瀹瑕杩ㄧ峰)|| none(娌℃灞ф瑰)

2transition-property灞уBR>(1)none锛transition椹姝㈡ц
(2)all锛绱浜х浠讳灞у煎堕藉цtransition
(3)attr锛瀹瑕杩ㄧ峰

涓transition-property瀹瑕杩ㄧ峰

1transition-property璇
[css]
transition-property :all(灞ф瑰) || [attr] (瀹瑕杩ㄧ峰)|| none(娌℃灞ф瑰)

2transition-property灞уBR>(1)none锛transition椹姝㈡ц
(2)all锛绱浜х浠讳灞у煎堕藉цtransition
(3)attr锛瀹瑕杩ㄧ峰

浜transition-duration
transition-duration瀹绱杞㈣绋缁堕达浣涓虹(s)transition-duration互浣ㄤ绱锛before:after

浼绱堕璁ゅ兼锛涔灏辨㈡舵虫剁

涓transition-delay 寤惰堕BR>transition-delayㄦユ瀹涓涓ㄧ诲濮ц堕达涔灏辨褰瑰绱灞у煎澶挎堕村濮цtransition锛浣涓(绉)

锛朵娇ㄥtransition-duration剁镐技锛涔互浣ㄤ绱锛before:after浼绱 榛璁ゅぇ灏0"锛涔灏辨㈢虫ц锛

娌℃寤惰

transition-timing-function瀹杩ㄥ舰寮
transition-timing-function 锛 ease(娓 | linear() | ease-in() | ease-out() | ease-in-out(跺

) | cubic-bezier(璇ュ煎璁镐昏涔涓涓堕存茬嚎)(number, number, number, number>)

浜transition缁煎娉
[css]
绱╁transition:杩ㄧ峰 缁堕 杩ㄥ舰寮 寤惰堕}

transition缁煎煎娉

1MozillaBR>[css]
绱╁-moz-transition:杩ㄧ峰 缁堕 杩ㄥ舰寮 寤惰堕}

2WebkitBR>[css]
绱╁-webkit-transition:杩ㄧ峰 缁堕 杩ㄥ舰寮 寤惰堕}

3OperaBR>[css]
绱╁-o-transition:杩ㄧ峰 缁堕 杩ㄥ舰寮 寤惰堕}

4W3C
[css]
绱╁transition:杩ㄧ峰 缁堕 杩ㄥ舰寮 寤惰堕}

 

瀹渚锛

浠g濡涓:


a{transition:all .6s ease-in-out;-webkit-transition:all .6s ease-in-out;-moz-transition:all .6s ease-in-out;-o-transition:all .6s ease-in-out;-ms-transition:all .6s ease-in-out;}

来源:http://www.jb51.net/article/50224.htm