css3动画

<!DOCTYPE html>

<html>

<head>

<meta charset="utf-8"/>

<title>毕业照</title>

<style type="text/css">

*{margin:0;

padding: 0;

}

ul{

width: 200px;

height: 200px;

position: absolute;

bottom: 100px;

left:50%;

margin-left: -100px;

transform-style: preserve-3d;

animation: sport 6s linear 0s infinite normal;}

body{

background: url("img/大合照.JPG");

background-size: cover;

overflow: hidden;

}

ul li{

list-style: none;

height: 200px;

width: 200px;

position:absolute;

left: 0;

right: 0;

background-color: black;

}

ul li:nth-child(1){

transform: rotateY(60deg) translateZ(200px);

}

ul li:nth-child(2){

transform: rotateY(120deg) translateZ(200px);

}

ul li:nth-child(3){

transform: rotateY(180deg) translateZ(200px);

}

ul li:nth-child(4){

transform: rotateY(240deg) translateZ(200px);

}

ul li:nth-child(5){

transform: rotateY(300deg) translateZ(200px);

}

ul li:nth-child(6){

transform: rotateY(360deg) translateZ(200px);

}

ul li img{

width: 200px;

height: 200px;

border:5px solid skyblue;

box-sizing: border-box;

}

@keyframes sport {

from{

transform:rotateX(-10deg) rotateY(0deg);

}

to{

transform:rotateX(-10deg) rotateY(360deg);

}

}

ul:hover{

animation-play-state: paused;

}

ul:hover li img{

opacity: 0.5;

}

ul li:hover img{

opacity: 1;

}

.m{

height: 173px;

width: 157px;

position: absolute;

left: 100px;

bottom: 100px;

animation: move 10s linear 0s infinite normal;

}

@keyframes move {

0%{

left: 100px;

bottom: 100px;

opacity:1;}

20%{

left: 300px;

bottom: 300px;

opacity:0;}

40%{

left:500px;

bottom: 500px;

opacity: 1;

}

60%{

left: 800px;

bottom: 300px;

opacity: 0;

}

80%{

left: 1200px;

bottom: 100px;

opacity: 1;

}

100%{

left:800px;

bottom: -200px;

opacity: 0;

}

}

</style>

</head>

<body>

<ul>

<li>

<img src="img/photo.jpg"/>

</li>

<li>

<img src="img/p1.jpg">

</li>

<li>

<img src="img/p2.jpg">

</li>

<li>

<img src="img/p3.jpg">

</li>

<li>

<img src="img/p4.jpg">

</li>

<li>

<img src="img/p5.jpg">

</li>

</ul>

<img class="m" src="img/p1.jpg"/>

<audio src="video/蒲公英的约定.mp3"  autoplay="autoplay" loop="loop"></audio>

</body>

</html>

最后编辑于
©著作权归作者所有,转载或内容合作请联系作者
【社区内容提示】社区部分内容疑似由AI辅助生成,浏览时请结合常识与多方信息审慎甄别。
平台声明:文章内容(如有图片或视频亦包括在内)由作者上传并发布,文章内容仅代表作者本人观点,简书系信息发布平台,仅提供信息存储服务。

推荐阅读更多精彩内容

  • perspective的介绍 指定观察者距离z=0平面的距离,为元素及其内容应用透视变换。当值为0或负值时,无透视...
    sunny519111阅读 9,131评论 1 6
  • 作者:blue(又名一书and一世界) 我的github**用途: **当作字典来查 some websites ...
    一书and一世界阅读 4,914评论 2 19
  • 关于css3变形 CSS3变形是一些效果的集合,比如平移、旋转、缩放和倾斜效果,每个效果都被称作为变形函数(Tra...
    hopevow阅读 11,502评论 2 13
  • 回程飞机思念有感 ------------------------------------------------...
    silverxu阅读 988评论 0 1
  • 因为我们学校田径场旁边就是一个再建的楼盘,自然有许多的外来务工人员,我们学校这边的围墙不知怎么就没了,所以在校园里...
    烽成活阅读 3,928评论 0 3