一、过渡模块的基本使用

1.*:hover;这个伪类选择器除了可以用在a标签上,还可以用在其他任何标签上。

2.过渡三要素:

(1)必须要有属性发生变化;(2)必须告诉系统哪个属性需要执行过渡效果;(3)必须告诉系统过渡效果持续的时长。

3.注意点:

当多个属性需要同时执行过渡效果的时候,可以使用英文逗号进行隔开。

例如:

transition-property:width,height,background-color;

transition-duration:0.4s,0.8s,4s;

transition-property:width,height,background-color;
transition-duration:0.4s,0.8s,4s;
<style>
*{
margin:0px;
padding:0px;
}
div{
width:100px;
height:50px;
background:red; }
div:hover{
width:300px;
height:300px;
background-color:blue;
/*告诉系统哪个属性将会使用过渡效果*/
transition-property:width,height,background-color;
/*告诉系统这个过渡效果需要持续多久*/
transition-duration:0.4s,0.8s,4s;
}
........省略代码.......
<div>
</div>

二、其他属性

  <style>
*{
margin:0px;
padding:0px;
}
div{
width:100px;
height:50px;
background:red; }
div:hover{
width:300px;
height:300px;
background-color:blue;
transition-property:width,height,background-color;
transition-duration:0.4s,0.8s,4s;
transition-delay:2s;
}
ul{
width:800px;
height:500px;
margin:0 auto;
background-color:pink;
}
ul li {
list-style:none;
width:100px;
height:50px;
margin-top:50px;
background-color:green;
transition-property:margin-left;
transition-duration:2s; }
ul:hover li{
margin-left:700px;
}
ul li:nth-child(1){
/*该属性用于控制动画运动速度的*/
transition-timing-function:linear;

}
ul li:nth-child(2){
transition-timing-function:ease;
}
ul li:nth-child(3){
transition-timing-function:ease-in;
}
ul li:nth-child(4){
transition-timing-function:ease-out;
}
ul li:nth-child(5){
transition-timing-function:ease-in-out;
}
......省略代码......
<div>
</div>
<ul>
<li>linear</li>
<li>ease</li>
<li>ease-in</li>
<li>ease-out</li>
<li>ease-in-out</li>
</ul>

三、源码:

D163_ExcessiveModule.html

地址:

https://github.com/ruigege66/HTML_learning/blob/master/ D163_ExcessiveModule.html

2.CSDN:https://blog.csdn.net/weixin_44630050

3.博客园:https://www.cnblogs.com/ruigege0000/

4.欢迎关注微信公众号:傅里叶变换,个人账号,仅用于技术交流,后台回复“礼包”获取Java大数据学习视频礼包

最新文章

  1. IBM Bluemix体验:Containers进阶
  2. block,inline和inline-block概念和区别
  3. CoreData的使用
  4. mono的Type.GetType(string)总是为空
  5. LFS7.4编译笔记(2)
  6. 打造自己的3D全景漫游
  7. tomcat升级问题
  8. 发送带有认证信息的HTTP请求并取回响应
  9. jQuery easyUI框架中经常出现的问题
  10. &#39;gbk&#39; codec can&#39;t encode character
  11. [python标准库]Pickle模块
  12. HDU1305 Immediate Decodability(水题字典树)
  13. WINDOWS的错误代码对应的故障
  14. [Leetcode 40]组合数和II Combination Sum II
  15. DOM表单(复选框)
  16. WPF中的路由事件(转)
  17. Pytorch数据读取框架
  18. An Edge-Guided Image Interpolation Algorithm via Directional Filtering and Data Fusion【翻译】
  19. Swoole和Swoft的那些事 (Http/Rpc服务篇)
  20. python学习之路---day19--面向对象--约束

热门文章

  1. Android Studio MainActivity中的R为红色
  2. 基于 HTML5 WebGL 的智慧楼宇可视化系统
  3. HTML兼容问题及解决办法
  4. css 浏览兼容问题及解决办法 (1)
  5. Go语言实现:【剑指offer】调整数组顺序使奇数位于偶数前面
  6. pytorch之 RNN regression
  7. Linux bash管道符“|”使用介绍与例子
  8. centos 7 设置 本地更新源
  9. NCE L5
  10. python--虚拟环境的使用