文章目录 函数(Functions) 注释(Comments) 导入(Importing) 函数(Functions) 因为函数实在太多了,一个一个写出来还记不住,没得多大意义,这里笔者只做简单举例,详细信息请转到https://less.bootcss.com/functions/#logical-functions查看 Less 内置了多种函数用于转换颜色、处理字符串、算术运算等。更多内容可以参考文档 (1) 逻辑判断函数 if() index.less代码 >>> @width:0px; div{ width:if((@width>10px),10px,20px)