当我悬停我的div时,我想要一个小旋转。它确实适用于另一个div,但它不适用于这个?
这是我的代码:
.more,
.more:visited {
color: #fff;
min-width: 88px;
height: 80px;
display: block;
background-color: green;
padding: 22px 28px 0 28px;
-webkit-box-sizing: border-box;
box-sizing: border-box;
position: absolute;
bottom: -40px;
right: 34px;
-webkit-transition: all 0.7s ease;
transition: all 0.7s ease;
}
.more:hover {
color: #fff;
transform: translateX(-230px);
}
<div id="meer"><a id="kleur" class="more" style="width: 105px; height:105px; padding: 32px 28px 22px 30px; mix-blend-mode: multiply;" href="<?php the_permalink(); ?>" title="<?php the_title(); ?>">LEES MEER</a>
</div>
答案 0 :(得分:3)
更改translateX()
的{{1}}会使您的div正确旋转。
rotate()
.more, .more:visited {
color:#fff;
min-width:88px;
height:80px;
display:block;
background-color: green;
padding:22px 28px 0 28px;
-webkit-box-sizing:border-box;
box-sizing:border-box;
position:absolute;
bottom:-40px;
right:34px;
-webkit-transition: all 0.7s ease;
transition: all 0.7s ease;
}
.more:hover {
color:#fff;
transform: rotate(-45deg);
}