太阳地球月亮运行动画(使用@keyframes)
闲来无事的demo
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<title></title>
<style type="text/css">
body{
background: #000;
}
.sun{
width: 280px;
height: 280px;
margin-top: 200px;
margin-left: 300px;
border:1px solid #FFA500;
background:#FFA500;
border-radius: 50%;
box-shadow:0px 0px 35px #FFA500;
animation:action 10s;
animation-iteration-count:infinite;
animation-timing-function:linear;
}
@keyframes action{
0% { transform: rotate(0deg) }
100% { transform: rotate(360deg)}
}
.earth{
border:1px solid #0000CC;
background:#0000CC;
box-shadow:0px 0px 35px #0000CC;
width: 40px;
height: 40px;
border-radius: 50%;
margin-left: -90px;
animation:actions 5s;
animation-iteration-count:infinite;
animation-timing-function:linear;
}
@keyframes actions{
0% { transform: rotate(0deg) }
100% { transform: rotate(360deg)}
}
.moon{
border:1px solid #F0F0F0;
background:#F0F0F0;
box-shadow:0px 0px 35px #F0F0F0;
width: 10px;
height: 10px;
border-radius: 50%;
margin-left: -20px;
}
</style>
</head>
<body> <div class="sun">
<div class="earth">
<div class="moon"></div>
</div>
</div> </body>
</html>
太阳地球月亮运行动画(使用@keyframes)的更多相关文章
- 关键帧动画:@keyframes
关键帧动画:@keyframes: <!DOCTYPE html> <html> <head> <meta charset="UTF-8" ...
- 随着ScrollView的滑动,渐渐的运行动画View
今天是实现了一个小功能的东西.看看效果图: 实现方式: 1.自己定义ScrollView 复写onScrollChange方法,来计算滑动的位置. 2.自己定义接口,通过接口来在ScrollVie ...
- TranslateAnimation 运行动画后实际位置不正确问题
最近在调试android 动画时候发现一个很奇怪问题,网上搜索都说TranslateAnimation 动画运行后,实际位置要在动画结束的监听里面重新设置才会正确,不然物体位置还是在原位. 我根据网上 ...
- css3动画(@keyframes和animation的用法)
animation基本用法是: animation: name keeping-time animate-function delay times iteration final; 第一个参数:nam ...
- 8 cocos2dx加入场景切换效果,控制场景切换彻底完毕之后再运行动画
1 加入场景切换效果 供场景切换的类: CCTransitionJumpZoom CCTransitionProgressRadialCCW CCTransitionProgressRadial ...
- css动画 aniamtion & @keyframes
MDN-animation文档 animation: [name] [duration] [timing-function] [delay] [iteration-cont] [direction] ...
- discuz修改太阳,月亮,星星等级图标
想必大家都想修改一下默认的等级图标吧,刚才在论坛上看见很多大神的方法都是要修改文件的,不过为了安全起见需要事先备份好才改,这种方法是可行的,但可能有些新手站长不会修改,又或者改错了恢复不来,现在我教大 ...
- cocos2d-js 运行动画
1.添加动画缓存 //添加动画缓存 cc.spriteFrameCache.addSpriteFrames(res.bug_plist); this.spriteSheet = new cc.Spri ...
- Animations动画和Keyframes关键帧
<!DOCTYPE html> <html lang="en"> <head> <meta charset="UTF-8&quo ...
随机推荐
- pyplot
错误: 执行 import matplotlib.pyplot 报错 ImportError: No module named _tkinter, please install the python- ...
- Spring核心-IOC-AOP-模版
1. POM- 1.1 中央仓库 1.2 各包作用 spring-core.jar 核心工具类 spring-beans.jar 是所有应用都要用到的,它包含访问配置文件.创建和管理bean 以及进行 ...
- MahApps.Metro控件更換微軟視窗主題
先來看一下微軟默認的視窗主題(左:Window)與MahApps.Metro的視窗主題(右:MetroWindow), Window MetroWindow MetroWindow似乎美觀多了 ...
- fetch技术
Snandy If you cannot hear the sound of the genuine in you, you will all of your life spend your days ...
- Socket网络通信之NIO
Socket网络通信之NIO NIO:new io ,java1.4开始推出的可非阻塞IO. java.nio 包,可解决BIO阻塞的不足 但比BIO学习.使用复杂. 可以以阻塞.非阻塞两种方式工作. ...
- Java-Excel写与读
很多时候,一个软件应用程序需要生成Microsoft Excel文件格式的报告.有时,一个应用程序甚至希望将Excel文件作为输入数据.例如,一个公司开发的应用程序将财务部门需要所有输出生成自己的Ex ...
- java技术小白的入门
一.入门书籍 1,疯狂java讲义 2,java编程思想 3,Maven权威指南 4,Spring 3.0就是这么简单 5,Spring技术内幕 6,Spring实战 7,Maven实战 二.入门业务 ...
- Implementation with Java
Implementation with Java From:http://jcsc.sourceforge.net In general, follow the Sun coding conventi ...
- hibernate 初印象
将要学习的内容: 1.HelloWorld a) xml b) annotation2.Hibernate 原理模拟 - 什么是 O/R Mapping 以及为什么要有 O/RMapping3.常见 ...
- Struts2_HelloWorld_3
struts.xml的配置 <?xml version="1.0" encoding="UTF-8" ?> <!DOCTYPE struts ...