css rotate a pseudo:after或:before content:“” [英] css rotate a pseudo :after or :before content:""
本文介绍了css rotate a pseudo:after或:before content:“”的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
反正要对伪
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;
-webkit-transform: rotate(30deg);
-moz-transform: rotate(30deg);
-o-transform: rotate(30deg);
-ms-transform: rotate(30deg);
transform: rotate(30deg);
}
这篇关于css rotate a pseudo:after或:before content:“”的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文