less07 important

简介:

less

复制代码
.foo (@bg: #f5f5f5, @color: #900) {
  background: @bg;
  color: @color;
  font-size: 16px;
  font-weight: 900;
}

.unimportant {
  .foo();
}
.important {
  .foo() !important;
}
复制代码

css

复制代码
.unimportant {
  background: #f5f5f5;
  color: #990000;
  font-size: 16px;
  font-weight: 900;
}
.important {
  background: #f5f5f5 !important;
  color: #990000 !important;
  font-size: 16px !important;
  font-weight: 900 !important;
}
复制代码

 



本文转自农夫山泉别墅博客园博客,原文链接:http://www.cnblogs.com/yaowen/p/7000305.html,如需转载请自行联系原作者
相关文章
|
5月前
问题 There is no screen to be resumed matching
问题 There is no screen to be resumed matching
60 0
|
6月前
15avalon - 指令ms-important(important绑定)
15avalon - 指令ms-important(important绑定)
29 1
|
前端开发 开发者
!Important 属性 | 学习笔记
快速学习!Important 属性。
120 0
|
C#
Beginner’s Tutorial: 3D Line and Border Effects in XAML
This mini-tutorial might be for you if you’re having troubles finding the right line colors to achieve simple 3D effects like these:   The solutio...
1112 0
|
Web App开发 前端开发