<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8" />
<title></title>
<style type="text/css">
*{
margin:0;
padding:0;
list-style:none;
}
body{
perspective:1000px;
/* perspective-origin:left bottom; */
}
ul{
width:400px;
height:800px;
margin:200px auto;
/* background:red; */
position:relative;
transform-style:preserve-3d;
animation:move 6s linear infinite;
}
@keyframes move{
from{
transform:rotateY(360deg);
}
to{
transform:rotateY(0deg);
}
}
ul li{
width:200px;
height:200px;
position:absolute;
left:200px;
top:50px;
margin-left:-100px;
border:1px solid green;
/* 倒影 */
-webkit-box-reflect: below 10px linear-gradient(to top,rgba(255,255,255,0.3) 20%,transparent 30%);
}
ul li:nth-child(1){
background: url(img/15208367115437620.jpg) no-repeat center/100% 100%;
}
ul:hover li:nth-child(1){
transform: rotatey(60deg) translatez(300px);
transition:all 1s;
}
ul li:nth-child(2){
background: url(img/古装5.jpg) no-repeat center/100% 100%;
}
ul:hover li:nth-child(2){
transform: rotatey(120deg) translateZ(300px);
transition:all 1s;
}
ul li:nth-child(3){
background: url(img/古装6.jpg) no-repeat center/100% 100%;
}
ul:hover li:nth-child(3){
transform: rotatey(180deg) translateZ(300px);
transition:all 1s;
}
ul li:nth-child(4){
background: url(img/可爱的小女孩.jpg) no-repeat center/100% 100%;
}
ul:hover li:nth-child(4){
transform: rotatey(240deg) translateZ(300px);
transition:all 1s;
}
ul li:nth-child(5){
background: url(img/可爱美女.jpg) no-repeat center/100% 100%;
}
ul:hover li:nth-child(5){
transform: rotatey(300deg) translateZ(300px);
transition:all 1s;
}
ul li:nth-child(6){
background: url(img/早安.jpg) no-repeat center/100% 100%;
}
ul:hover li:nth-child(6){
transform: rotatey(360deg) translateZ(300px);
transition:all 1s;
}
</style>
</head>
<body>
<ul>
<li></li>
<li></li>
<li></li>
<li></li>
<li></li>
<li></li>
</ul>
</body>
</html>
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8" />
<title></title>
<style type="text/css">
*{
margin:0;
padding:0;
list-style:none;
}
body{
perspective:1000px;
/* perspective-origin:left bottom; */
}
ul{
width:400px;
height:800px;
margin:200px auto;
/* background:red; */
position:relative;
transform-style:preserve-3d;
animation:move 6s linear infinite;
}
@keyframes move{
from{
transform:rotateY(360deg);
}
to{
transform:rotateY(0deg);
}
}
ul li{
width:200px;
height:200px;
position:absolute;
left:200px;
top:50px;
margin-left:-100px;
border:1px solid green;
/* 倒影 */
-webkit-box-reflect: below 10px linear-gradient(to top,rgba(255,255,255,0.3) 20%,transparent 30%);
}
ul li:nth-child(1){
background: url(img/15208367115437620.jpg) no-repeat center/100% 100%;
}
ul:hover li:nth-child(1){
transform: rotatey(60deg) translatez(300px);
transition:all 1s;
}
ul li:nth-child(2){
background: url(img/古装5.jpg) no-repeat center/100% 100%;
}
ul:hover li:nth-child(2){
transform: rotatey(120deg) translateZ(300px);
transition:all 1s;
}
ul li:nth-child(3){
background: url(img/古装6.jpg) no-repeat center/100% 100%;
}
ul:hover li:nth-child(3){
transform: rotatey(180deg) translateZ(300px);
transition:all 1s;
}
ul li:nth-child(4){
background: url(img/可爱的小女孩.jpg) no-repeat center/100% 100%;
}
ul:hover li:nth-child(4){
transform: rotatey(240deg) translateZ(300px);
transition:all 1s;
}
ul li:nth-child(5){
background: url(img/可爱美女.jpg) no-repeat center/100% 100%;
}
ul:hover li:nth-child(5){
transform: rotatey(300deg) translateZ(300px);
transition:all 1s;
}
ul li:nth-child(6){
background: url(img/早安.jpg) no-repeat center/100% 100%;
}
ul:hover li:nth-child(6){
transform: rotatey(360deg) translateZ(300px);
transition:all 1s;
}
</style>
</head>
<body>
<ul>
<li></li>
<li></li>
<li></li>
<li></li>
<li></li>
<li></li>
</ul>
</body>
</html>