太阳地球月亮运行动画(使用@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 ...
随机推荐
- [转]jQuery为控件添加水印文字
本文转自:http://www.cnblogs.com/gzh4455/archive/2011/09/29/2195418.html jQuery扩展: jquery.tinywatermark-3 ...
- [转]JS 只能输入数字和两位小数的JS
本文转自:http://blog.sina.com.cn/s/blog_724008890101dgep.html JS代码: <script language="JavaScript ...
- ubuntu 16.04 安装genymotion
以ubuntu 16.04 64bit 系统为例: 1. 下载 通过https://www.genymotion.com/download/ 下载自己操作系统版本的可执行文件( ...
- [OpenStack] [Liberty] Neutron单网卡桥接模式访问外网
环境配置: * Exsi一台 * Exsi创建的单网卡虚拟机一台 * Ubuntu 14LTS 64位操作系统 * OpenStack Liberty版本 * 使用Neutron网络而非Nova网络 ...
- Murano Deployment
2015-09-14 05:53:02 — Action deploy is scheduled 2015-09-14 05:53:03 — Unable to load due to 'could ...
- (转)Rsync 排错案例解析
Rsync 排错案例解析 原文:http://blog.51cto.com/irow10/1827306 错误一. 执行计划任务的备份脚本后没有看到备份的文件 1.首先查看crontab日志是否执行文 ...
- 深入学习hbase:表,列族,列标识,版本和cell
HBase是面向列的分布式的数据库,和传统的关系型数据库有很大的不同:物理模型和逻辑模型.这里我们要首先讲一下HBase数据库相关的区别于关系型数据库的几个基本概念: 表:HBase ...
- React.js 小书 Lesson4 - 前端组件化(三):抽象出公共组件类
作者:胡子大哈 原文链接:http://huziketang.com/books/react/lesson4 转载请注明出处,保留原文链接和作者信息. 为了让代码更灵活,可以写更多的组件,我们把这种模 ...
- ora-12541:tns: 无监听程序解决办法
1.首先找到 Oracle 安装文件 中 listener.ora文件与tnsnames.ora文件: 列如:路径:E:\app\当前系统的账户名\product\11.2.0\dbhome_1\NE ...
- intellijidea课程 intellijidea神器使用技巧 3-3 postfix
Ctrl shift A ==> postfix completion 调出postfix 方法体中 ==> for 100.fori ==>enter for循环10 ...