less-!important关键字

//!important关键字
使用!important关键字混入调用之后,以标记它继承的所有属性!important,example:
.test{
    background:red;
    font-size:18px;
    color:blue;
}

.study{
    .test()!important;
}

//ouput css
.test {
  background: red;
  font-size: 18px;
  color: blue;
}
.study {
  background: red !important;
  font-size: 18px !important;
  color: blue !important;
}

同样的在这里mixin函数后的括号仍然为可选,比如这样也是对的:.study{.test!important;}

作者:leona

原文链接:http://www.cnblogs.com/leona-d/p/6296635.html

版权声明:本文版权归作者和博客园共有,欢迎转载,但未经作者同意必须保留此段声明,且在文章页面明显位置给出原文链接

原文地址:https://www.cnblogs.com/leona-d/p/6296635.html