大海案例
来源:互联网 发布:ubuntu 14.04 安装 编辑:程序博客网 时间:2024/04/29 13:53
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<title>CSS3 动画</title>
<style>
html, body {
height: 100%;
}
body {
margin: 0;
padding: 0;
background-color: #0EA9B1;
}
section {
height: 100%;
position: relative;
overflow: hidden;
}
.bg1, .bg2 {
position: absolute;
left: 0;
/*bottom: 0;*/
width: 100%;
}
.bg1 {
bottom: 20px;
height: 211px;
background-image: url(./1.png);
/*调用*/
animation: move 1s linear infinite;
}
.bg2 {
bottom: 0;
height: 235px;
background-image: url(./2.png);
animation: move 1s linear infinite;
}
.sun {
width: 50px;
height: 50px;
background-color: #FFF;
border-radius: 25px;
position: absolute;
left: 200px;
top: 100px;
}
.sun::before, .sun::after {
content: '';
display: block;
position: absolute;
left: 0;
top: 0;
width: 100%;
height: 100%;
background-color: #FFF;
border-radius: 25px;
}
.sun::before {
animation: scale 1s infinite linear;
}
.sun::after {
animation: scale 1s 0.5s infinite linear;
}
@keyframes scale {
0% {
/*transform: scale(1);
opacity: 1;*/
}
100% {
transform: scale(2);
opacity: 0;
}
}
/*动画序列*/
@keyframes move {
0% {
/**/
}
50% {
bottom: -20px;
}
100% {
/**/
}
}
</style>
</head>
<body>
<section>
<div class="sun"></div>
<div class="bg1"></div>
<div class="bg2"></div>
</section>
</body>
</html>
<html lang="en">
<head>
<meta charset="UTF-8">
<title>CSS3 动画</title>
<style>
html, body {
height: 100%;
}
body {
margin: 0;
padding: 0;
background-color: #0EA9B1;
}
section {
height: 100%;
position: relative;
overflow: hidden;
}
.bg1, .bg2 {
position: absolute;
left: 0;
/*bottom: 0;*/
width: 100%;
}
.bg1 {
bottom: 20px;
height: 211px;
background-image: url(./1.png);
/*调用*/
animation: move 1s linear infinite;
}
.bg2 {
bottom: 0;
height: 235px;
background-image: url(./2.png);
animation: move 1s linear infinite;
}
.sun {
width: 50px;
height: 50px;
background-color: #FFF;
border-radius: 25px;
position: absolute;
left: 200px;
top: 100px;
}
.sun::before, .sun::after {
content: '';
display: block;
position: absolute;
left: 0;
top: 0;
width: 100%;
height: 100%;
background-color: #FFF;
border-radius: 25px;
}
.sun::before {
animation: scale 1s infinite linear;
}
.sun::after {
animation: scale 1s 0.5s infinite linear;
}
@keyframes scale {
0% {
/*transform: scale(1);
opacity: 1;*/
}
100% {
transform: scale(2);
opacity: 0;
}
}
/*动画序列*/
@keyframes move {
0% {
/**/
}
50% {
bottom: -20px;
}
100% {
/**/
}
}
</style>
</head>
<body>
<section>
<div class="sun"></div>
<div class="bg1"></div>
<div class="bg2"></div>
</section>
</body>
</html>
阅读全文
0 0
- 大海案例
- 大海
- 大海
- 大海
- Cocos2d-x 3.0final -贪食蛇游戏案例(全)----沈大海
- 大海无边无际
- 向往大海
- 致大海
- 星辰大海
- 致大海
- 大海波涛
- 大海波浪
- 大海里的船
- 面朝大海,春暖花开
- 大海和鱼
- 见到了大海
- 面朝大海,春暖花开
- 我去大海玩 :)
- Java 链表常见考题总结
- Spring读书笔记——bean创建(下)
- 【复习记录】Tarjan
- 解决Ubuntu中Qt5 Creator不能使用搜狗输入法输入汉字问题
- R学习笔记 第六篇:数据变换和清理
- 大海案例
- 深度探索C++对象模型【第三章2】
- IntelliJ IDEA中类似Eclipse自动补全变量名称和属性名称的快捷键
- 【XML】xStream浅录
- Mac下获取AppStore更新下载安装包文件路径
- 一个比较实用的商业级图表Echarts
- System.arraycopy的使用方法详解
- 项目生成jar包
- Sublime配置lua开发环境傻瓜式教学