标签:执行 ack 变换 获得 otto ext length 没有 one
transition允许css的属性值在一定的时间区间内平滑地过渡。这种效果可以在鼠标单击、获得焦点、被点击或对元素任何改变中触发,并圆滑地以动画效果改变CSS的属性值。transition包含4个属性值:执行变换的属性:transition-property,变换延续的时间:transition-duration,变换的速率变化:transition-timing-function,变换的延迟时间:transition-delay:
#timings-demo { border: 1px solid #ccc; padding: 10px; height: 400px; width: 400px; } .demo-box { width: 100px; height: 50px; text-align: center; line-height: 50px; text-align: center; color: #fff; background: #96c; border-radius: 5px; box-shadow: inset 0 0 5px rgba(102, 153, 0,0.5); margin-bottom: 10px; } <div id="timings-demo"> <div id="ease" class="demo-box">Ease</div> <div id="ease-in" class="demo-box">Ease-in</div> <div id="ease-out" class="demo-box">Ease-out</div> <div id="ease-in-out" class="demo-box">Ease-in-out</div> <div id="linear" class="demo-box">Linear</div> <div id="cubic-bezier" class="demo-box">Cubic-bezier</div> </div>
/*ease效果:*/ #ease { transition: all 5s ease 0.3s; background: #f36; } /*ease-in效果:*/ #ease-in { transition: all 3s ease-in 0.5s; background: #369; } /*ease-out效果:*/ #ease-out { transition: all 5s ease-out 0s; background: #636; } /*ease-in-out效果:*/ #ease-in-out { transition: all 1s ease-in-out 2s; background: #3e6; } /*linear效果:*/ #linear { transition: all 6s linear 0s; background: #999; } /*cubic-bezier效果:*/ #cubic-bezier { transition: all 4s cubic-bezier 1s; background: #6d6; } #timings-demo:hover .demo-box{ transform: rotate(360deg) scale(1.2); background: #369; border: 1px solid rgba(255,230,255,08); -moz-border-radius: 25px; -webkit-border-radius: 25px; border-radius: 25px; margin-left: 280px; height: 30px; line-height: 30px; margin-bottom: 15px; }
.demo{ width:100px; height:100px; text-align:center; line-height:100px; border:10px solid #ccc; border-radius:60px; font-size:20px; -webkit-backface-visibility:hidden; } #demo1{ transition:border-color 0.3s ease; } #demo1:hover{ border-color:#a3d7ff; } #demo2{ transition:all 1s ease; } #demo2:hover{ background:#a3d7ff; transform: rotate(360deg); transition:background 0.3s ease; } <div id="demo1" class="demo">demo1</div> <div id="demo2" class="demo">demo2</div>
标签:执行 ack 变换 获得 otto ext length 没有 one
原文地址:https://www.cnblogs.com/yuyujuan/p/13838583.html