CSS3 in order to distinguish between pseudo-classes and pseudo-elements, pseudo-elements are written with double colons.
Common Pseudo-Class--:hover,:link,:active,:target,:not (),: Focus.
Common pseudo-element--::first-letter,::first-line,::before,::after,::selection.
:: Before and:: After-specific content, used in CSS rendering to add to the head or tail of the element's logic.
These additions do not appear in the DOM, do not change the contents of the document, are not duplicated, but are only added to the CSS render layer.
So do not use: Before or: After show meaningful content, use them as much as possible to display the cosmetic content, the example of the mark.
Example: the website some contact phone, want to add an icon before them, you can use: before pseudo-element, as follows:
<!DOCTYPE HTML><MetaCharSet= "Utf-8" /><styletype= "Text/css">. Phonenumber::before{content:' \260e ';font-size:15px;}</style><Pclass= "PhoneNumber">12345645654</P>
The Html,js and CSS of these special characters are different.
Use:: befor and:: After pseudo elements to add icons to a Web site