前端教程
当前位置:主页 > 资讯 > 前端教程 >
HTML---回归的盾牌
发布日期:2020-06-02 阅读次数: 字体大小:

<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<title>盾牌</title>
<style type="text/css">
*{
margin: 0;
padding: 0;
}
body{
background-color: red;
}
section{
width: 440px;
height: 500px;
margin:100px auto;
position: relative;
}
section img{
position: relative;
transition: 3s;
}
section img:nth-child(1){
transform: translate(80px,80px) rotate(45deg);
}
section:hover img:nth-child(1){
transform: translate(0) rotate(0deg);
}

section img:nth-child(2){
transform: translate(80px,-10px) rotate(-180deg);
}
section:hover img:nth-child(2){
transform: translate(0) rotate(0deg);
}

section img:nth-child(3){
transform: translate(180px,180px);
}
section:hover img:nth-child(3){
transform: translate(0);
}

section img:nth-child(4){
transform: translate(-180px,80px) rotate(-90deg);
}
section:hover img:nth-child(4){
transform: translate(0) rotate(0deg);
}
</style>
</head>
<body>
<section>
<img src="img/shield_1_01.png" >
<img src="img/shield_1_02.png" >
<img src="img/shield_1_03.png" >

<img src="img/shield_1_04.png" >
<img src="img/shield_1_05.png" >
<img src="img/shield_1_06.png" >

<img src="img/shield_1_07.png" >
<img src="img/shield_1_08.png" >
<img src="img/shield_1_09.png" >
</section>
</body>
</html>