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

How to add geometric text using css3 pseudo-object selector

WBOY
Release: 2016-09-20 03:29:57
Original
1590 people have browsed it

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

        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>}
Copy after login
source:php.cn
Statement of this Website
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
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template