css 做幻灯片效果
生活随笔
收集整理的這篇文章主要介紹了
css 做幻灯片效果
小編覺得挺不錯的,現在分享給大家,幫大家做個參考.
?設置一個div 盒子
<div class="ani"></div>
設置css 樣式
?
.ani{width:480px;height:320px;margin:50px auto;overflow: hidden;box-shadow: 0 0 5px rgba(0,0,0,1);background-size:cover;background-position: center;-webkit-animation-name:"loops";-webkit-animation-duration:20s;-webkit-animation-iteration-count:infinite;}@-webkit-keyframes "loops"{0%{background: url(img/advert_1.jpg) no-repeat;}25%{background: url(img/advert_2.jpg) no-repeat;}50%{background: url(img/advert_3.jpg) no-repeat;}75%{background: url(img/advert_4.jpg) no-repeat;}100%{background: url(img/advert_5.jpg) no-repeat;}}?
轉載于:https://www.cnblogs.com/ysshuai/p/6684768.html
創作挑戰賽新人創作獎勵來咯,堅持創作打卡瓜分現金大獎總結
以上是生活随笔為你收集整理的css 做幻灯片效果的全部內容,希望文章能夠幫你解決所遇到的問題。
- 上一篇: [转]你每天90%的注意力被浪费了
- 下一篇: js表单验证插件