纯css实现相册三维转盘效果
代码语言:html
所属分类:动画
代码描述:纯css实现相册三维转盘效果
下面为部分代码预览,完整代码请点击下载或在bfwstudio webide中打开
<!DOCTYPE html> <html lang="en"> <head> <meta charset="UTF-8"> <style> body{ margin:0; padding:0; background: #607d8d; } .box{ position: absolute; top:calc(50% - 150px); left:calc(50% - 100px); transform: perspective(1000px) rotate(-90deg); width: 200px; height: 300px; transform-style:preserve-3d; background: #fff; border: 3px solid blue; } .box div{ position: absolute; top:0; left:0; width:100%; height:100%; transform-style:preserve-3d; animation: animate 10s linear infinite; border: 3px solid white; } .box div harry { position:absolute; top: 0; left:0; display: block; width: 100%; height: 100%; background: linear-gradient(0deg, #f1f1f1, #bbb, #f1f1f1); border: 3px solid white; } .box div harry:nth-child(1) { transform: rotateX(0deg); } .box div harry:nth-child(2) { transform: rotateX(45deg); } .box div harry:nth-child(3) { transform: rotateX(-45deg) } .box div harry:nth-child(4) { transform: rotateX(90deg); } @keyframes animate { 0%{ transform:perspective(1000px) rotateX(0deg); } 100%{ transform:perspective(1000px) rotateX(360deg); } } .hello{ width: .........完整代码请登录后点击上方下载按钮下载查看
网友评论0