【发布时间】:2017-03-07 08:19:46
【问题描述】:
当悬停在<span> 上时,我正在尝试缩放:before 的内容。 到目前为止,悬停时会应用样式,但没有视觉变化,:before保持相同的比例。
到目前为止我得到了什么:
<div class="comment-actions">
<span class="comment-likes icon-ico-heart">
12
</span>
</div>
SASS (CSS):
.comment-likes
transition: all 100ms ease-in-out
color: #92a3b9
cursor: pointer
&:hover::before
transform: scale(1.5)
Icomoon:
.icon-ico-heart:before {
content: "\e914";
}
[class^="icon-"], [class*=" icon-"] {
/* use !important to prevent issues with browser extensions that change fonts */
font-family: 'icomoon' !important;
speak: none;
font-style: normal;
font-weight: normal;
font-variant: normal;
text-transform: none;
line-height: 1;
/* Better Font Rendering =========== */
-webkit-font-smoothing: antialiased;
-moz-osx-font-smoothing: grayscale;
}
【问题讨论】: