Styling Pseudo-elements for Icons in CSS


Use pseudo-elements to add icons or decorative elements without additional HTML.

Source Code

.icon::before {
    content: url('icon.svg');
    margin-right: 8px;
}
Subscribe
Notify of
guest
0 Comments
Inline Feedbacks
View all comments