<!DOCTYPE html>
<html>
<head lang="en">
<meta charset="UTF-8">
<title></title>
<style>
.parent{
width: 100px;
height: 100px;
border: 10px solid black;
padding: 100px;
margin: 30px auto;
}
.son{
position: relative;
width: 100px;
height: 100px;
transition: 1s;
transform-style: preserve-3d;
perspective:500px;
transform-origin: center center 50px;
animation: 1s move6 5s both linear infinite;
}
.son div{
position: absolute;
width: 100px;
height: 100px;
}
.son div:nth-child(1){
animation: 1s move1 both;
}
.son div:nth-child(2){
animation: 1s move2 1s both;
}
.son div:nth-child(3){
animation: 1s move3 2s both;
}
.son div:nth-child(4){
animation: 1s move4 3s both;
}
.son div:nth-child(5){
animation: 1s move5 4s both;
}
.son div:nth-child(6){
background: yellow;
}
@keyframes move1 {
100%{
position: absolute;
top: -100px;
width: 100px;
height: 100px;
background: magenta;
transform-origin: bottom;
transform: rotateX(-90deg);
}
}
@keyframes move2 {
100%{
position: absolute;
left: -100px;
width: 100px;
height: 100px;
background: greenyellow;
transform-origin: right;
transform: rotateY(90deg);
}
}
@keyframes move3 {
100%{
position: absolute;
top: 100px;
width: 100px;
height: 100px;
background: lemonchiffon;
transform-origin: top;
transform: rotateX(90deg);
}
}
@keyframes move4 {
100%{
position: absolute;
left: 100px;
width: 100px;
height: 100px;
background: mediumblue;
transform-origin: left;
transform: rotateY(-90deg);
}
}
@keyframes move5 {
100%{
position: absolute;
width: 100px;
height: 100px;
background: lightcoral;
transform: translateZ(100px);
}
}
@keyframes move6 {
100%{
transform: rotateX(360deg) rotateY(360deg);
}
}
</style>
</head>
<body>
<div class="parent">
<div class="son">
<div>1</div>
<div>2</div>
<div>3</div>
<div>4</div>
<div>5</div>
<div>6</div>
</div>
</div>
</body>
</html>
3d魔方動(dòng)畫(huà)
最后編輯于 :
?著作權(quán)歸作者所有,轉(zhuǎn)載或內(nèi)容合作請(qǐng)聯(lián)系作者
【社區(qū)內(nèi)容提示】社區(qū)部分內(nèi)容疑似由AI輔助生成,瀏覽時(shí)請(qǐng)結(jié)合常識(shí)與多方信息審慎甄別。
平臺(tái)聲明:文章內(nèi)容(如有圖片或視頻亦包括在內(nèi))由作者上傳并發(fā)布,文章內(nèi)容僅代表作者本人觀點(diǎn),簡(jiǎn)書(shū)系信息發(fā)布平臺(tái),僅提供信息存儲(chǔ)服務(wù)。
【社區(qū)內(nèi)容提示】社區(qū)部分內(nèi)容疑似由AI輔助生成,瀏覽時(shí)請(qǐng)結(jié)合常識(shí)與多方信息審慎甄別。
平臺(tái)聲明:文章內(nèi)容(如有圖片或視頻亦包括在內(nèi))由作者上傳并發(fā)布,文章內(nèi)容僅代表作者本人觀點(diǎn),簡(jiǎn)書(shū)系信息發(fā)布平臺(tái),僅提供信息存儲(chǔ)服務(wù)。
相關(guān)閱讀更多精彩內(nèi)容
- “你說(shuō)呢,柳萌,這里有這么美麗的風(fēng)景,我要是不走走看,那我莫開(kāi)陽(yáng)還要眼睛干什么呀,”莫開(kāi)陽(yáng)嬉皮笑臉地說(shuō),“我莫開(kāi)陽(yáng)...
- 二零一零年~二零一七年,將近十年的時(shí)光,耗盡了我對(duì)生活的激情?,F(xiàn)在的自己,頹廢,失落,沉浸在自己的世界里,不敢走出...
- 由于眼部皮膚沒(méi)有皮脂腺、汗腺,薄嫩程度是正常臉部皮膚的10分之1,外加每個(gè)人每天眨動(dòng)約25000次 ,眼部要比臉部...