码迷,mamicode.com
首页 > 其他好文 > 详细

less避免编译

时间:2018-07-16 11:12:25      阅读:116      评论:0      收藏:0      [点我收藏+]

标签:span   浏览器   编译   height   strong   bsp   nbsp   width   col   

less里面有一个避免编译,有时候我们需要输出一些不正确的css语法或者使用less不认识的专有语法。要输出这样的值我们可以在字符串前加上一个~

/*避免编译*/

.test_03{
  width: 300px;
  height: calc(300px - 30px);
}
=>
.test_03 {
  width: 300px;
  height: calc(270px);
}
这个calc,有时候我们是让浏览器计算,不是让less计算
.test_03{
  width: 300px;
  height: ~‘calc(300px - 30px)‘;
}
=>
.test_03 {
  width: 300px;
  height: calc(300px - 30px);
}

 

 

less避免编译

标签:span   浏览器   编译   height   strong   bsp   nbsp   width   col   

原文地址:https://www.cnblogs.com/wzndkj/p/9315842.html

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!