<!DOCTYPE html>
<html>
<head>
<meta charset="UTF-8">
<title>CSS3弹簧特效</title>
<style>
* {
margin: 0;
padding: 0
}
html,body{
width: 100%;
height: 100%;
display: flex;
}
body{
perspective: 800px;
} .wrap{
width: 400px;
height: 400px;
margin: auto;
transform: rotateX(60deg);
position: relative;
transform-style: preserve-3d;
}
.wrap div{
position: absolute;
border: 15px solid #ccd7d9;
border-color: #ccd7d9 #d2dbde #d7e0e2 #d2dbde;
border-radius: 50%;
box-shadow: 0 1px 0 #fff, 0 10px 0 #abbdc1 inset, 0 10px 0 #abbdc1;
transform: translateZ(-50px);
}
.wrap div:nth-child(1){
left: calc( 400px/2 - 340px/2 - 15px );
top: calc( 400px/2 - 340px/2 - 15px );
width: 340px;
height: 340px; animation: play1 2s 2400ms ease-in-out infinite alternate;
}
.wrap div:nth-child(2){
left: calc( 400px/2 - 280px/2 - 15px );
top: calc( 400px/2 - 280px/2 - 15px );
width: 280px;
height: 280px;
animation: play1 2s 2000ms ease-in-out infinite alternate;
}
.wrap div:nth-child(3){
left: calc( 400px/2 - 220px/2 - 15px );
top: calc( 400px/2 - 220px/2 - 15px );
width: 220px;
height: 220px;
animation: play1 2s 1600ms ease-in-out infinite alternate;
}
.wrap div:nth-child(4){
left: calc( 400px/2 - 160px/2 - 15px );
top: calc( 400px/2 - 160px/2 - 15px );
width: 160px;
height: 160px;
animation: play1 2s 1200ms ease-in-out infinite alternate;
}
.wrap div:nth-child(5){
left: calc( 400px/2 - 100px/2 - 15px );
top: calc( 400px/2 - 100px/2 - 15px );
width: 100px;
height: 100px;
animation: play1 2s 800ms ease-in-out infinite alternate;
}
.wrap div:nth-child(6){
left: calc( 400px/2 - 40px/2 - 15px );
top: calc( 400px/2 - 40px/2 - 15px );
width: 40px;
height: 40px;
animation: play1 2s 400ms ease-in-out infinite alternate;
}
@keyframes play1 {
from{
transform: translateZ(-50px);
}
to{
transform: translateZ(100px);
}
}
</style>
</head>
<body>
<div class="wrap">
<div></div>
<div></div>
<div></div>
<div></div>
<div></div>
<div></div>
</div>
</body>
</html>

最新文章

  1. 控制EasyUI DataGrid高度
  2. WPF弹出带蒙板的消息框
  3. 用css实现条纹背景
  4. PL/sql语法单元
  5. 详解H264视频格式-2016.01.28
  6. netty是什么?
  7. js设置cookie过期及清除浏览器对应名称的cookie
  8. easyui源码翻译1.32--Pagination(分页)
  9. FileUpload上传文件无法获取文件名
  10. SAP HANA SLT 将Oracle表 数据同步到HANA数据库
  11. robot自动化测试(二)--- template使用
  12. Ani动态光标格式解析
  13. 实践作业1:测试管理工具实践 Day4
  14. javascript学习(2)修改html元素和提示对话框
  15. python数学第十天【最大似然估计】
  16. layui(三)——laypage组件常见用法总结
  17. Zookeeper学习笔记2
  18. mac中安装lua5.1.5
  19. Crash 文件调试
  20. docker之网络管理

热门文章

  1. CF392BTower of Hanoi(记忆化搜索)
  2. Git初步配置 ubuntu服务器 windows客户端 虚拟机
  3. T-SQL 镜像测试
  4. 入门webpack,看这篇就够了
  5. GitHub 用户排行榜
  6. rocksdb编译步骤——Java、Golang、mac
  7. drf初体验
  8. Apache NiFi 核心概念和关键特性
  9. 1、大型项目的接口自动化实践记录--robotframework环境搭建
  10. 记录eclipse中文出现空格宽度不一致的bug