本文共 1445 字,大约阅读时间需要 4 分钟。
<!DOCTYPE html><html lang="en"><head> <meta charset="UTF-8"> <title>Title</title> <style type="text/css"> * { margin: 0; padding: 0; } body{ perspective: 1000px; } section{ width:310px; height:430px; margin: 100px auto; background: url("image/pk1.png") no-repeat; background-size: cover; position: relative; transform-style: preserve-3d; transition: all 5s linear; } section:hover{ transform: rotateY(360deg); animation-iteration-count: infinite; } section div{ width:100%; height:100%; background: url("image/pk1.png") no-repeat; position: absolute; top: 0; left:0; } section div:nth-child(1){ transform: rotateY(0deg) translateZ(400px); } section div:nth-child(2){ transform: rotateY(60deg) translateZ(400px); } section div:nth-child(3){ transform: rotateY(120deg) translateZ(400px); } section div:nth-child(4){ transform: rotateY(180deg) translateZ(400px); } section div:nth-child(5){ transform: rotateY(240deg) translateZ(400px); } section div:nth-child(6){ transform: rotateY(300deg) translateZ(400px); } </style></head><body> <section> <div></div> <div></div> <div></div> <div></div> <div></div> <div></div> </section></body></html>
转载地址:http://bgog.baihongyu.com/