html5——动画案例(大海)
太阳的发散效果主要是利用transform: scale(1.3),将物体变大
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<title>Title</title>
<style>
* {
padding: 0;
margin: 0;
} html, body {
width: 100%;
height: 100%;
background-color: lightseagreen;
overflow: hidden;
} .sun {
width: 80px;
height: 80px;
position: absolute;
top: 45px;
left: 67px;
background-color: #fff;
border-radius: 50%;
} .sun1, .sun2 {
position: absolute;
top: 0;
left: 0;
width: 80px;
height: 80px;
background-color: #fff;
border-radius: 50%;
} .sun1 {
animation: bigger 1s infinite alternate;
} .sun2 {
animation: bigger 1s infinite 0.5s alternate;
} .bottom {
width: 100%;
height: 235px;
position: absolute;
bottom: 0;
left: 0;
} .bottom1, .bottom2 {
width: 100%;
position: absolute;
left: 0;
bottom: 0;
opacity: 0.5;
} .bottom1 {
height: 211px;
background: url("images/bolang1.png");
background-size: cover;
animation: upDown 1s infinite alternate;
} .bottom2 {
height: 235px;
background: url("images/bolang2.png");
background-size: cover;
animation: upDown 1s infinite alternate 0.5s;
} @keyframes bigger {
0% {
opacity: 1;
transform: scale(1);
}
100% {
opacity: 0.3;
transform: scale(1.3);
}
} @keyframes upDown {
0% {
bottom: 0px;
} 100% {
bottom: -20px;
}
} </style>
</head>
<body>
<div class="sun">
<div class="sun1"></div>
<div class="sun2"></div>
</div>
<div class="bottom">
<div class="bottom1"></div>
<div class="bottom2"></div>
</div>
</body>
</html>

html5——动画案例(大海)的更多相关文章
- html5——动画案例(时钟)
1.秒钟转360度需要60s分60步 2.分针转360度需要3600s分60步 3.秒钟转360度需要43200s分60步 <!DOCTYPE html> <html lang=&q ...
- html5——动画案例(无缝滚动)
无缝滚动:是两组拼在一起的 <!DOCTYPE html> <html lang="en"> <head> <meta charset=& ...
- html5——动画案例(太阳系)
太阳系主要利用定位,伪元素 <!DOCTYPE html> <html lang="en"> <head> <meta charset=& ...
- 精选19款华丽的HTML5动画和实用案例
下面是本人收集的19款超酷HTML5动画和实用案例,觉得不错,分享给大家. 1.HTML5 Canvas火焰喷射动画效果 还记得以前分享过的一款HTML5烟花动画HTML5 Canvas烟花特效,今天 ...
- HTML5 动画效果的多种实现方式
HTML5 动画效果的多种实现方式 1. CSS3 transform + transition https://www.w3.org/TR/css-transforms-1/ https://ww ...
- 给你推荐10款优秀的 HTML5 动画工具
HTML5 在过去三年快速增长,已经成为 Web 开发人员最喜欢的编程语言之一.强大的编程语言拥有开发更好的网页应用的能力. HTML5 中引入的新技术都非常好,像 Chrome.Firefox.Sa ...
- HTML5 Maker – 在线轻松制作 HTML5 动画效果
HTML5 Maker 是一个在线动画制作工具,帮助你使用 HTML,CSS 和 JavaScript 创建动态,互动的内容.它非常容易使用,同时可以帮你实现非常好的效果.它可以制作跨浏览器的动画内容 ...
- HTML5动画软件工具编辑器 HTML5动画分类 工具推荐
接下来介绍几款制作HTML5动画的工具,它们可以分为几类: 1.导出canvas动画: Flash CC(13.1).Animation.Radi 2.导出DIV+CSS3动画: HTML5 Make ...
- 精妙无比 8款HTML5动画实例及源码
1.jQuery垂直带小图标菜单导航插件 今天我们要来分享一款jQuery菜单插件,这款jQuery菜单是垂直的样式,鼠标滑过菜单项时会出现一个背景,菜单项的右侧也会出现一个小箭头.另外值得注意的是, ...
随机推荐
- poj 3925 枚举+prime
/* 因为15很小可以暴力枚举然后用最小生成树的prim来计算 */ #include<stdio.h> #include<string.h> #include<math ...
- 在JQuery中$(document.body)和这个$("body") 这两的区别在哪里?
两种写法代表的是同一个对象 $("body") 是一个选择器,jQuery 会从 DOM 顶端开始搜索,直到找到标签为 body 的元素. 而 $(document.body) 中 ...
- iOS消息推送原理和实现总结
一.消息推送原理: 在实现消息推送之前先提及几个于推送相关概念,如下图:1. Provider:就是为指定IOS设备应用程序提供Push的服务器,(如果IOS设备的应用程序是客户端的话,那么Provi ...
- docker Cannot start container [8] System error: exec format error
docker Cannot start container [8] System error: exec format error 学习了:https://www.aliyun.com/jiaoch ...
- poj 1331 Multiply
Multiply Time Limit: 1000MS Memory Limit: 10000K Total Submissions: 5179 Accepted: 2773 Descript ...
- Effective C++ Item 44 将与參数无关的代码抽离 templates
本文为senlie原创,转载请保留此地址:http://blog.csdn.net/zhengsenlie 经验:Templates 生成多个 classes 和多个函数,所以不论什么 templat ...
- Android 自己定义圆圈进度并显示百分比例控件(纯代码实现)
首先,感谢公司能给我闲暇的时间,来稳固我的技术,让我不断的去探索研究,在此不胜感激. 先不说实现功能,上图看看效果 watermark/2/text/aHR0cDovL2Jsb2cuY3Nkbi5uZ ...
- jquery 数组添加不重复数据
var columnCommentsArray = new Array(); $("input[name='columnComments']").each( function(){ ...
- UVA1601 The Morning afther Halloween
题目大意 w h (w, h <= 16)的网格有 n ( n <= 3) 个小写字母(代表鬼)其余的是‘#’(代表障碍格) 或 ‘ ’(代表空格. 要求把他们移动到对应的大写字母里.每步 ...
- [1525] Cow Xor
问题描述 农民约翰在喂奶牛的时候被另一个问题卡住了.他的所有N(1 <= N <= 100,000)个奶牛在他面前排成一行(按序号1..N的顺序),按照它们的社会等级排序.奶牛#1有最高的 ...