太阳地球月亮运行动画(使用@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 ...
随机推荐
- 夜神模拟器连不上adb的解决办法
解决办法: 1.任务管理器里看下,adb.exe以及nox_adb.exe这2个进程有没有在运行?有的话就结束掉 2.找到开发环境的SDK的目录和夜神模拟器的目录,将SDK\platform-tool ...
- Murano Weekly Meeting 2015.10.13
Meeting time: 2015.October.13th 1:00~2:00 Chairperson: Serg Melikyan, PTL from Mirantis Meeting sum ...
- LeetCode 981.基于时间的键值存储(C++)
创建一个基于时间的键值存储类 TimeMap,它支持下面两个操作: 1. set(string key, string value, int timestamp) 存储键 key.值 value,以及 ...
- Ubuntu 16.04下安装Charles抓包工具
Charles是一个跨平台的抓包工具,虽然没有Fiddler做的这么完美,但是也算是另一个选择. 下载: https://www.charlesproxy.com/download/ 注册: http ...
- css3重点回顾字体
1.字体 免费字体下载https://cn.ffonts.net/
- qingdao
1001 #include <bits/stdc++.h> using namespace std; vector<long long> v; long long pow2(l ...
- [C#]为什么Interface里的成员不能使用static修饰?
首先引用MSDN里的原文 Interface members are automatically public, and they can't include any access modifiers ...
- 工作流常使用API
记录实际开发中常使用到的API CreateProcess 在工作流开始之前,创建一个新的工作流 Wf_engine.CreateProcess (itemtype in varchar2, - ...
- 【小结】IIS7下的Http Native Module开发
今天接到Product Manager的通知,Exchange 2007环境下的Native Module不再需要开发(详情可见上篇),但最近几天一直在做Prototype,那就做一下小结吧,总结一下 ...
- PHP 简单调用rest WebServices
<?php $ch = curl_init("http://api.cachk.com:8185/Tech-Trans.esPOS4.PosService.UAT/rest/enqui ...