Top Good Web Design

Web Designer

CSS navigation by using pseudo elements, slash separators(css:before)

Look at the effect of the first:

Began to cut the first picture, the first problem is the top navigation bar here, with a slash. Thought of the idea is to use pseudo class: : before or after the implementation

Write HTML structure.



    .link:before{content: "/";margin:0 24px;color: grey;}   

Use: first bofore, set the content is “/”, margin, before and after the color. Reoccupy first before – the child will be the first element of pseudo-classes are removed.

Leave a Reply