@joshnh 感谢您提供的灵感,这里进行了一些修改,使其看起来更像:
<div class="flip-card">
<div class="flip-card-inner">
<div class="flip-card-front"></div>
<div class="flip-card-thick"></div>
<div class="flip-card-back"></div>
</div>
</div>
.flip-card {
background-color: transparent;
width: 300px;
height: 300px;
perspective: 1000px;
}
.flip-card-inner {
position: relative;
width: 100%;
height: 100%;
text-align: center;
background: transparent url(https://i.imgur.com/GPCt3mC.jpg) no-repeat;
background-size: 100% 100%;
border-radius: 100%;
transition: transform 4s;
transform-style: preserve-3d;
}
.flip-card-front, .flip-card-back, .flip-card-inner:before, .flip-card-inner:after {
background-color: #a37131;
position: absolute;
width: 100%;
height: 100%;
border-radius: 100%;
overflow: hidden;
z-index: 1;
}
.flip-card-inner:before {
content: '';
top: 0;
left: 0;
transform: rotateY(180deg) translateZ(1px);
background-image: -webkit-linear-gradient(hsla(0,0%,100%,.25), hsla(0,0%,0%,.25));
}
.flip-card-inner:after {
content: '';
top: 0;
left: 0;
transform: rotateY(180deg) translateZ(10px);
background-image: -webkit-linear-gradient(hsla(0,0%,100%,.25), hsla(0,0%,0%,.25));
}
.flip-card-front {
background-color: #bbb;
color: black;
}
.flip-card-back {
background-color: #a37131;
color: white;
transform: rotateY(180deg) translateZ(11px);
}
.flip-card-thick {
background-color: #a37131;
background-image: -webkit-linear-gradient(hsla(0,0%,100%,.25), hsla(0,0%,0%,.25));
bottom: 0;
left: 130px;
position: absolute;
top: 0px;
width: 10px;
z-index: -10;
transform: rotateY(-90deg);
transform-origin: 100% 50%;
}
.flip-card:hover .flip-card-inner {
transform: rotateY(180deg);
}
密码笔