无论如何都要对伪进行旋转
anyway to make a rotation work on the pseudo
content:"24B6"?
我正在尝试旋转一个 unicode 符号.
I'm trying to rotate a unicode symbol.
内联元素不能转换,伪元素默认是内联的,所以必须应用 display: block
或 display: inline-block
来转换它们:
Inline elements can't be transformed, and pseudo elements are inline by default, so you must apply display: block
or display: inline-block
to transform them:
#whatever:after {
content: "24B6";
display: inline-block;
transform: rotate(30deg);
}
<div id="whatever">Some text </div>
这篇关于css 旋转一个伪 :after 或 :before content:""的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持html5模板网!