html5(h5)和css3(c3)绘制的太阳系
来源:互联网 发布:java intent bundle 编辑:程序博客网 时间:2024/05/20 12:51
<!DOCTYPE html><html><head lang="en"> <meta charset="UTF-8"> <title></title> <style> body{ background-color: #000; overflow: hidden; } .sun{ width: 100px; height: 100px; position: absolute; left:50%; top:50%; transform:translate(-50%,-50%); background-color: yellow; border-radius: 50%; box-shadow: 0px 0px 20px 0px red; } .earth{ width: 300px; height: 300px; position: absolute; left:50%; top:50%; transform:translate(-50%,-50%); border:1px solid #ccc; border-radius: 50%; /*调用动画*/ animation: rot 5s linear infinite; } .earth::before{ content:""; width:50px; height: 50px; position: absolute; top:50%; transform:translate(-50%,-50%); background-color: dodgerblue; border-radius: 50%; } .mars{ width: 450px; height: 450px; position: absolute; left:50%; top:50%; transform:translate(-50%,-50%); border:1px solid #ccc; border-radius: 50%; /*调用动画*/ animation: rot 8s linear infinite; } .mars::before{ content:""; width:30px; height: 30px; position: absolute; top:50%; transform:translate(-50%,-50%); background-color: gold; border-radius: 50%; } .venus{ width: 550px; height: 550px; position: absolute; left:50%; top:50%; transform:translate(-50%,-50%); border:1px solid #ccc; border-radius: 50%; /*调用动画*/ animation: rot 10s linear infinite; } .venus::before{ content:""; width:60px; height: 60px; position: absolute; top:50%; transform:translate(-50%,-50%); background-color: hotpink; border-radius: 50%; } .moon{ width: 70px; height: 70px; position: absolute; top:50%; transform:translate(-50%,-50%); /*border:1px solid #ccc;*/ border-radius: 50%; animation: rot 2s linear infinite; } .moon::before{ content:""; width:10px; height: 10px; position: absolute; top:50%; transform:translate(-50%,-50%); background-color: #fff; border-radius: 50%; } @keyframes rot { 0%{ transform:translate(-50%,-50%) rotate(0deg) ; } 100%{ transform:translate(-50%,-50%) rotate(360deg) ; } } </style></head><body> <div class="sun"></div> <div class="earth"> <div class="moon"></div> </div> <!-- 火星--> <div class="mars"></div> <!-- 金星--> <div class="venus"></div></body></html>
0 0
- html5(h5)和css3(c3)绘制的太阳系
- html5 太阳系(1)
- html5 太阳系(2)
- HTML5绘制太阳系
- HTML5和CSS3权威指南-读书笔记(H5部分)
- 校招季--献给前端求职路上的你们(H5+C3)
- c3&h5权威指南(1)
- HTML5 canvas绘制太阳系各行星(包括月球的公转)
- html5动画基础(canvas,太阳系)
- html5 canvas 绘制太阳系模型 练习
- WEB前端开发:轮播图的实现(H5+C3+JavaScript)(JQuery)
- OpenGL(5)--太阳系和的日月地实现
- H5和HTML5的区别
- HTML5和CSS3权威指南-读书笔记(CSS3部分)
- 自己写的一个近似模拟太阳系行星运行的代码(更新CSS3代码在下方)
- DIV + CSS3 和 html5 + CSS3的区别
- CSS3和H5的新特性
- css3和html5的学习
- 剑英陪你玩转图形学 (三)归去来
- Socket通信
- instance “error” 了怎么办?- 每天5分钟玩转 OpenStack(159)
- python-字符串反转
- jQuery总结
- html5(h5)和css3(c3)绘制的太阳系
- My “Hello World” For Blog
- fzuacm 2017 新生寒假训练 6
- Leetcode #387 First Unique Character in a String
- OOM
- hdu 1874 最短路径
- javaScript中的BOM对象-History和screen(3)
- iOS 环信集成问题(连文档都不说明的坑。。)
- Android命名规范