CSS3多张图片围绕圆圈做缓慢转动
2015-08-07 14:36
656 查看
<!DOCTYPE HTML> <html> <head> <meta charset='UTF-8'> <style type="text/css"> .circle{position: absolute; top: 50%; left: 50%; margin-top: -150px; margin-left: -150px; width: 300px; height: 300px; border: 1px solid #333; border-radius: 50%;} .circle .c-circle{ width: 100%; height: 100%; border-radius: 100%; position: absolute; transform-origin: center center; animation: circle 300s linear infinite; } .circle .c-circle:after{ content: ''; position: absolute; transform: translate(-50%, -50%); border-radius: 100%; } .circle .first:after{ width: 80px; height: 80px; left: 40px; top: 250px; background: url(../img/1.jpg) no-repeat; background-size: cover; } .circle .second:after{ width: 50px; height: 50px; left: 40px; top: 50px; background: url(../img/2.jpg) no-repeat; background-size: cover; } .circle .third:after{ width: 80px; height: 80px; left: 250px; top: 50px; background: url(../img/3.jpg) no-repeat; background-size: cover; } .circle .four:after{ width: 60px; height: 60px; left: 255px; top: 250px; background: url(../img/4.jpg) no-repeat; background-size: cover; } @keyframes circle{ 0% { transform: rotate(0deg); } 100% { transform: rotate(360deg); } } </style> </head> <body> <div class="circle"> <div class="c-circle first"></div> <div class="c-circle second"></div> <div class="c-circle third"></div> <div class="c-circle four"></div> </div> </body> </html>效果图如下所示:
相关文章推荐
- CSS3属性教程与案例分享
- CSS3属性教程与案例分享
- CSS3的calc()使用
- 使用CSS3的appearance属性改变元素的外观
- CSS3美化图片
- CSS3质感分析——表面线性渐变
- 分析选项卡底部内凹圆角制作
- 细说百度图片栏目——图片展示效果
- 8个实用的响应式设计框架
- 20+ Animation Scripts, Libraries and Plugins
- 如何使用CSS3画出一个叮当猫
- CSS3实例分享之多重背景的实现(Multiple backgrounds)
- 低版本IE正常运行HTML5+CSS3网站的3种解决方案
- CSS3中Transition属性详解以及示例分享
- 分享33个jQuery与CSS3实现的绚丽鼠标悬停效果
- jquery和css3实现的炫酷时尚的菜单导航
- 实现音乐播放器的代码(html5+css3+jquery)
- 2014 HTML5/CSS3热门动画特效TOP10
- jQuery+css3实现文字跟随鼠标的上下抖动
- JavaScript快速检测浏览器对CSS3特性的支持情况