Home  >  Article  >  Web Front-end  >  What does & mean in css

What does & mean in css

王林
王林forward
2020-06-02 16:18:254662browse

What does & mean in css

Let’s first look at a piece of css source code:

ul{
    margin-bottom: 20px;
    & >li {
        margin-bottom: 0;
    }
  }

(Video tutorial recommendation: css video tutorial)

& represents the previous level of nesting.

This is the syntax of sass, which represents the upper-level selector.

The above source code is equivalent to the following code:

ul{margin-bottom: 20px;}
ul > li {margin-bottom: 0;}

Recommended tutorial: css quick start

The above is the detailed content of What does & mean in css. For more information, please follow other related articles on the PHP Chinese website!

Statement:
This article is reproduced at:csdn.net. If there is any infringement, please contact admin@php.cn delete