Network Security Internet Technology Development Database Servers Mobile Phone Android Software Apple Software Computer Software News IT Information

In addition to Weibo, there is also WeChat

Please pay attention

WeChat public account

Shulou

How to use pure CSS3 to realize the effect of picture rotation

2025-03-31 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Development >

Share

Shulou(Shulou.com)06/01 Report--

这篇文章给大家分享的是有关怎么使用纯CSS3实现图片轮播的效果的内容。小编觉得挺实用的,因此分享给大家做个参考,一起跟随小编过来看看吧。

*{

margin:0;

padding:0;

text-decoration:none;

}

ul{

list-style:none;

}

ulli{

width:400px;

height:200px;

}

#container{

position:relative;

width:400px;

height:200px;

overflow:hidden;/*隐藏溢出的图片*/

}

.pic{

width:1600px;/*4张图的宽度*/

position:absolute;/*基于父容器进行定位*/

left:0;

animation-name:carousel;

animation-duration:12s;

animation-iteration-count:infinite;/*//动画调用可以简写*/

}

@keyframescarousel{

0%,30%{

left:0;

}

35%,65%{

left:-400px;

}

70%,99%{

left:-800px;

}

100%{

left:-1200px;

}

}

.picli{

float:left;

background:#5dd94e;

}

.picliimg{

width:400px;

height:200px;

}

111

222

333

111

感谢各位的阅读!关于"怎么使用纯CSS3实现图片轮播的效果"这篇文章就分享到这里了,希望以上内容可以对大家有一定的帮助,让大家可以学到更多知识,如果觉得文章不错,可以把它分享出去让更多的人看到吧!

Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.

Views: 0

*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.

Share To

Development

Wechat

© 2024 shulou.com SLNews company. All rights reserved.

12
Report