有一个我转换的块。它有一个属性,当鼠标悬停在块上时,我需要属性中的文本是均匀的。我没有做对,也许有人可以提供帮助。
.pos {
height: 75px;
width: 162px;
left: 100px;
top: 100px;
background: blue;
transform: rotateY(-43deg) rotateX(62deg) rotate(26deg);
border-radius: 5px;
position: absolute;
z-index: 2;
}
.pos:hover:before {
visibility: visible;
opacity: 1;
}
.pos:before {
content: attr(data-crop);
visibility: hidden;
position: absolute;
transform: rotateY(212deg) rotateX(116deg) rotate(148deg);
font-size: 38px;
line-height: 60px;
background: rgba(0, 0, 0, 0.46);
opacity: 0;
margin-top: -72px;
margin-left: -167px;
width: 484px;
text-align: center;
color: rgb(255, 255, 255);
transition: 0.5s;
}
<div class="pos" data-crop="Этот текст должен быть ровным"></div>


该解决方案并不完美,但有效
https://codepen.io/anon/pen/MoVqWJ
多亏了答案代号 0082016(它有一个带有属性的相邻块),我做到了,当鼠标悬停在块上时,
:before相邻块出现