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

What does & mean in CSS

angryTom
angryTomforward
2020-04-01 17:01:1617407browse

This article introduces the meaning of & in CSS. I hope it will be helpful to friends who are learning CSS! & is the syntax of Sass, indicating the upper level of nesting. There is no & in CSS.

What does & mean in CSS

What does & mean in CSS

Such as source code:

(Recommended study: CSS Tutorial )

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

& Represents the nested upper level

This is the syntax of sass, representing the upper level selector

is interpreted as The CSS code is as follows

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

For more related tutorials, please pay attention to PHP Chinese website!

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