css3 preserve-3d实现圆环绕物体以及动画效果
实现效果
【css3 preserve-3d实现圆环绕物体以及动画效果】
文章图片
直接上代码
文章图片
{{ score }}
{{ totle_text }}
防护能力评分
文章图片
文章图片
.index {
.watchContainer {
height: 250px;
.safeScore {
position: absolute;
width: 200px;
height: 100%;
text-align: center;
margin-top: 5px;
top: 9%;
left: 14%;
perspective: 1000px;
transform-style: preserve-3d;
.dun {
position: absolute;
left: 50%;
transform: translateX(-50%) translateZ(-100px);
width: 118px;
height: 130px;
z-index: 20;
top: 0px;
animation: jump 3s both infinite;
img {
position: absolute;
top: 0;
left: 0;
width: 100%;
height: 100%;
}
}
.mark,
.level {
position: absolute;
top: 37%;
left: 50%;
transform: translateX(-50%);
font-size: 14px;
z-index: 3;
font-weight: bold;
color: #e6a23c;
}
.level {
top: 56%;
font-size: 12px;
}
h3 {
font-size: 12px;
color: whitesmoke;
position: absolute;
top: 22%;
width: 100px;
left: 50%;
transform: translateX(-50%);
z-index: 3;
}
.mark {
top: 35%;
left: 50%;
font-size: 25px;
}
.baseCircle {
position: absolute;
transform: translate(-50%, -50%) rotateX(68deg);
z-index: 0;
left: 50%;
top: 52%;
width: 100px;
height: 114px;
background: url(./images/bgCircle.png) no-repeat;
background-size: 100% 100%;
}
.innerCircle,
.outerCircle {
position: absolute;
width: 130px;
height: 130px;
top: 0%;
left: 50%;
transform: translateX(-50%);
}
.outerCircle {
left: 50%;
top: -18%;
height: 170px;
width: 170px;
}
.swipCircle {
width: 200px;
height: 200px;
perspective: 250px;
transform-style: preserve-3d;
div {
width: 200px;
padding: 20px;
top: -20px;
height: 200px;
border-radius: 60%;
border: 3px solid #4cc2ff;
position: absolute;
animation: move 3s linear infinite;
}
}
}
@keyframes move {
0% {
top: -80px;
transform: translate3d(0px, -30px, -25px) rotateX(68deg) scale(1);
}
25% {
top: 10px;
transform: translate3d(0px, -30px, -25px) rotateX(68deg) scale(0.6);
}
75% {
top: 10px;
transform: translate3d(0px, -30px, -25px) rotateX(68deg) scale(0.8);
}
100% {
top: -80px;
transform: translate3d(0px, -30px, -25px) rotateX(68deg) scale(1);
}
}
.spin1 {
animation: spin 4s linear infinite;
}
.spinreverse {
animation: spin 5s linear infinite reverse;
}
@keyframes spin {
from {
transform: translateX(-50%) rotate(0deg);
}
to {
transform: translateX(-50%) rotate(360deg);
}
}
@keyframes jump {
0% {
top: 0%;
}
50% {
top: -5%;
}
100% {
top: 0%;
}
}
}
}
推荐阅读
- 关于QueryWrapper|关于QueryWrapper,实现MybatisPlus多表关联查询方式
- MybatisPlus使用queryWrapper如何实现复杂查询
- python学习之|python学习之 实现QQ自动发送消息
- 孩子不是实现父母欲望的工具——林哈夫
- opencv|opencv C++模板匹配的简单实现
- Node.js中readline模块实现终端输入
- java中如何实现重建二叉树
- 人脸识别|【人脸识别系列】| 实现自动化妆
- paddle|动手从头实现LSTM
- pytorch|使用pytorch从头实现多层LSTM