Css3-实现小圆环绕大圆360旋转
2016-12-27 15:44
417 查看
效果如图:
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8">
<style type="text/css">
body{margin:0px;padding:0px;}
.big,.small,.big1{width: 150px;height: 150px;color: #e25f5b;font-weight: bold;border-radius:50%;border: 1px solid #007aff;position:absolute;bottom: 80px;right:5px;z-index:1;text-align: center;background: -webkit-linear-gradient(158.5deg, #fff 0%, #007aff 100%);background: linear-gradient(158.5deg, #fff 0%, #007aff 100%);}
.big{box-shadow:5px 6px 10px #848181;-webkit-animation:circle 5s infinite linear;/*匀速 循环*/}
.big1{width:148px;height:148px;line-height:148px;bottom: 81px;right: 6px;background:none;z-index:2;}
.small{width: 10px;height: 10px;background: #eaac1a;bottom: 155px;right: 88px;border: 1px dashed #e0d222;}
@-webkit-keyframes circle{
0%{ transform:rotate(0deg); }
100%{ transform:rotate(360deg); }
}
</style>
</head>
<body>
<h4>两个大圆,big和big1,big是会转,并且有阴影,big1不会转,没阴影,用来挡住big。
小圆,看html结构,与大圆big是父级关系,故其转动时伴随大圆big的。</h4>
<div style="position:relative;width:400px;height:400px;">
<div class="big">
<div class="small"></div>
</div>
<div class="big1">大圆</div>
</div>
</body>
</html>
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8">
<style type="text/css">
body{margin:0px;padding:0px;}
.big,.small,.big1{width: 150px;height: 150px;color: #e25f5b;font-weight: bold;border-radius:50%;border: 1px solid #007aff;position:absolute;bottom: 80px;right:5px;z-index:1;text-align: center;background: -webkit-linear-gradient(158.5deg, #fff 0%, #007aff 100%);background: linear-gradient(158.5deg, #fff 0%, #007aff 100%);}
.big{box-shadow:5px 6px 10px #848181;-webkit-animation:circle 5s infinite linear;/*匀速 循环*/}
.big1{width:148px;height:148px;line-height:148px;bottom: 81px;right: 6px;background:none;z-index:2;}
.small{width: 10px;height: 10px;background: #eaac1a;bottom: 155px;right: 88px;border: 1px dashed #e0d222;}
@-webkit-keyframes circle{
0%{ transform:rotate(0deg); }
100%{ transform:rotate(360deg); }
}
</style>
</head>
<body>
<h4>两个大圆,big和big1,big是会转,并且有阴影,big1不会转,没阴影,用来挡住big。
小圆,看html结构,与大圆big是父级关系,故其转动时伴随大圆big的。</h4>
<div style="position:relative;width:400px;height:400px;">
<div class="big">
<div class="small"></div>
</div>
<div class="big1">大圆</div>
</div>
</body>
</html>
相关文章推荐
- CSS3属性教程与案例分享
- CSS3属性教程与案例分享
- CSS3的calc()使用
- 使用CSS3的appearance属性改变元素的外观
- CSS3美化图片
- CSS3质感分析——表面线性渐变
- 分析选项卡底部内凹圆角制作
- 细说百度图片栏目——图片展示效果
- 8个实用的响应式设计框架
- 20+ Animation Scripts, Libraries and Plugins
- CSS3结合fontawesome字体实现自定义单选框复选框效果
- 新时代编辑神器:Atom
- 如何使用CSS3画出一个叮当猫
- 基于Jquery和CSS3制作数字时钟附源码下载(CSS3篇)
- CSS3 3D 技术手把手教你玩转
- jQuery+HTML5+CSS3制作支持响应式布局时间轴插件
- jQuery CSS3相结合实现时钟插件
- CSS3实现动态翻牌效果 仿百度贴吧3D翻牌一次动画特效
- CSS3实例分享之多重背景的实现(Multiple backgrounds)
- 低版本IE正常运行HTML5+CSS3网站的3种解决方案