过渡_html/css_WEB-ITnose

WBOY
Release: 2016-06-24 11:22:38
Original
936 people have browsed it

 1 <!DOCTYPE html> 2 <html> 3 <head> 4 <style>  5 div 6 { 7 width:100px; 8 height:100px; 9 background:yellow;10 transition:width 2s;11 -moz-transition:width 2s; /* Firefox 4 */12 -webkit-transition:width 2s; /* Safari and Chrome */13 -o-transition:width 2s; /* Opera */14 }15 16 div:hover17 {18 width:300px;19 }20 </style>21 </head>22 <body>23 24 <div></div>25 26 <p>请把鼠标指针放到黄色的 div 元素上,来查看过渡效果。</p>27 28 <p><b>注释:</b>本例在 Internet Explorer 中无效。</p>29 30 </body>31 </html>
Copy after login

 1 <!DOCTYPE html> 2 <html> 3 <head> 4 <style>  5 div 6 { 7 width:100px; 8 height:100px; 9 background:yellow;10 transition:width 2s, height 2s;11 -moz-transition:width 2s, height 2s, -moz-transform 2s; /* Firefox 4 */12 -webkit-transition:width 2s, height 2s, -webkit-transform 2s; /* Safari and Chrome */13 -o-transition:width 2s, height 2s, -o-transform 2s; /* Opera */14 }15 16 div:hover17 {18 width:200px;19 height:200px;20 transform:rotate(180deg);21 -moz-transform:rotate(180deg); /* Firefox 4 */22 -webkit-transform:rotate(180deg); /* Safari and Chrome */23 -o-transform:rotate(180deg); /* Opera */24 }25 </style>26 </head>27 <body>28 29 <div>请把鼠标指针放到黄色的 div 元素上,来查看过渡效果。</div>30 31 <p><b>注释:</b>本例在 Internet Explorer 中无效。</p>32 33 </body>34 </html>
Copy after login

 

transition-timing-function

 

Related labels:
source:php.cn
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template
About us Disclaimer Sitemap
php.cn:Public welfare online PHP training,Help PHP learners grow quickly!