Home  >  Article  >  Web Front-end  >  How to add geometric text using css3 pseudo-object selector

How to add geometric text using css3 pseudo-object selector

WBOY
WBOYOriginal
2016-09-20 03:29:571527browse

伪对象选择器包含三种,分别为:

        E::selection

        E::after

        E::before

其中before和after必须与content结合使用,如果content想用几何图形要加 \ 进行转义,content里面的内容相当于文字,可以通过color改变颜色,font-size改变大小

等等。

其书写方式为:

#E::before{<br>    content:"\25C0";//获取的方法<br>    color: rgba(254, 0, 0, 0.6);//可以改变它的颜色<br>    font-size: 20px;//可以改变它的大小<br>    position: relative;<br>    left: -29px;//改变位置<br>}
Statement:
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn