This time to bring you the CSS of the pseudo-class content generation, CSS pseudo-class content generated by the attention of the matter, the following is the actual case, together to see.
1. Add new text (image) content to existing elements via CSS
Selector:
1,: Before
Increase the generated content before matching elements
Position to the beginning of the matching element
2.: After
Add generated content to a matching element
eg
div:before{}
p:after{}
Property:
1. Content
function: Mate: Before,: After pseudo element insert generated content div:before{
Content: "What is generated:";
}
Common values:
String: Normal text
URL: Image
Counter
Believe that you have read the case of this article you have mastered the method, more exciting please pay attention to the PHP Chinese network other related articles!
Related reading:
Browser not compatible with the code I wrote
2018 latest front-end questions Xi.