css 实现3d转盘效果
<template> <div class="wrapper"> <div class="demo1"> <span class="item" v-for="i in 6" @click="testClick(this)">测试{{i}}</span> </div> <div class="demo2"> <span class="item" v-for="i in 3" @click="testClick(this)">测试{{i}}</span> </div> </div> </template> <script> export default { name: "TestTwo", methods: { testClick(obj){ console.log("点击的控件:", obj); //alert('点击了:' + obj); } }, created() {
} } </script> <style scoped> @keyframes play { from{ transform: rotateX(-12deg) rotateY(0deg); } to{ transform: rotateX(-12deg) rotateY(360deg); } } div.demo1 { top: 120px; left: 120px; position: relative; width: 200px; height: 200px; transform-style: preserve-3d; transform: rotateX(0deg) rotateY(0deg); margin-right: -100px; animation: play 10s linear 0s infinite normal; } /*animation: play 10s linear 0s infinite normal*/ /*animation 参数*/ /*animation-name 规定需要绑定到选择器的 keyframe 名称。。*/ /*animation-duration 规定完成动画所花费的时间,以秒或毫秒计。*/ /*animation-timing-function 规定动画的速度曲线。*/ /*animation-delay 规定在动画开始之前的延迟。*/ /*animation-iteration-count 规定动画应该播放的次数。*/ /*animation-direction 规定是否应该轮流反向播放动画。*/ span.item { display: inline-block; width: 200px; height: 200px; background-color: #efefef; position: absolute; top: 0; left: 0; border: 2px solid #13ce66; text-align: center; line-height: 200px; font-size: 60px } div.demo1:hover { animation-play-state: paused; } span.item:hover { background-color: #5daf34; } span.item:nth-child(1) { transform: rotateY(60deg) translateZ(200px); } span.item:nth-child(2) { transform: rotateY(120deg) translateZ(200px); } span.item:nth-child(3) { transform: rotateY(180deg) translateZ(200px); } span.item:nth-child(4) { transform: rotateY(240deg) translateZ(200px); } span.item:nth-child(5) { transform: rotateY(300deg) translateZ(200px); } span.item:nth-child(6) { transform: rotateY(360deg) translateZ(200px); } div.demo2 { top: 120px; left: 120px; position: relative; width: 200px; height: 200px; transform-style: preserve-3d; transform: rotateX(0deg) rotateY(0deg); margin-right: -100px; margin-top: 50px; animation: play 10s linear 0s infinite normal; } div.demo2:hover { animation-play-state: paused; } div.demo2 span.item:hover { background-color: #5daf34; margin-top: -50px; margin-left: -50px; width: 300px; height: 300px; } div.demo2 span.item:nth-child(1) { transform: rotateY(120deg) translateZ(200px); } div.demo2 span.item:nth-child(2) { transform: rotateY(240deg) translateZ(200px); } div.demo2 span.item:nth-child(3) { transform: rotateY(360deg) translateZ(200px); } </style>
【推荐】国内首个AI IDE,深度理解中文开发场景,立即下载体验Trae
【推荐】编程新体验,更懂你的AI,立即体验豆包MarsCode编程助手
【推荐】抖音旗下AI助手豆包,你的智能百科全书,全免费不限次数
【推荐】轻量又高性能的 SSH 工具 IShell:AI 加持,快人一步
· AI与.NET技术实操系列:基于图像分类模型对图像进行分类
· go语言实现终端里的倒计时
· 如何编写易于单元测试的代码
· 10年+ .NET Coder 心语,封装的思维:从隐藏、稳定开始理解其本质意义
· .NET Core 中如何实现缓存的预热?
· 25岁的心里话
· 闲置电脑爆改个人服务器(超详细) #公网映射 #Vmware虚拟网络编辑器
· 零经验选手,Compose 一天开发一款小游戏!
· 因为Apifox不支持离线,我果断选择了Apipost!
· 通过 API 将Deepseek响应流式内容输出到前端
2017-09-06 android videoView 加载等待