摘要: //Mixins --立即执行函数 .test{/* */} #test{/* */} --指定执行函数 .test(){/* */} #test(){/* */} --调用: .test; or .test(); #test; or #test(); 这些函数,你可以用css的各种选择器去命名 - 阅读全文
posted @ 2017-01-18 18:00 YanEr、 阅读(531) 评论(0) 推荐(0) 编辑
摘要: //mixin传参 --简单传参,example: .border-radius(@radius) { -webkit-border-radius: @radius; -moz-border-radius: @radius; border-radius: @radius; } .callUse{ . 阅读全文
posted @ 2017-01-18 15:10 YanEr、 阅读(5431) 评论(0) 推荐(0) 编辑
摘要: //!important关键字 使用!important关键字混入调用之后,以标记它继承的所有属性!important,example: .test{ background:red; font-size:18px; color:blue; } .study{ .test()!important; } 阅读全文
posted @ 2017-01-18 14:29 YanEr、 阅读(2274) 评论(0) 推荐(0) 编辑
摘要: //mixin函数 基础使用方法 --包含选择器,example: .test(){ &:hover{ border:1px solid red; } } button{ .test; } //output css button:hover { border: 1px solid red; } -- 阅读全文
posted @ 2017-01-18 14:14 YanEr、 阅读(451) 评论(0) 推荐(0) 编辑
摘要: //mixin函数 立即执行mixin函数,example: .test{ color:#ff00000; background:red; } //立即执行mixin grammar 1 扩展extend .study{ &:extend(.test); } //输出css .test, .stud 阅读全文
posted @ 2017-01-18 13:39 YanEr、 阅读(2880) 评论(0) 推荐(0) 编辑
摘要: //扩展Extend Use Method:以在study上扩展指定多层嵌套选择器样式 //Share style .test{ font-size:18px; color:#ffffff; ul{ width:100px; height:50px; li{ float:left; margin-r 阅读全文
posted @ 2017-01-18 11:49 YanEr、 阅读(4815) 评论(0) 推荐(0) 编辑
摘要: //扩展Extend Use Method:以在study上扩展多个的样式为例 //Share style 1 .style1{ width:200px; height:15px; color:#ffffff; } //Share style 2 .style2{ float:left; backg 阅读全文
posted @ 2017-01-18 11:44 YanEr、 阅读(1438) 评论(0) 推荐(0) 编辑
摘要: //扩展Extend less的伪类,合并了选择器,放在与它引用匹配的选择器上 Use Method:以在study上扩展test的样式为例 .test{ color:#000000; font-size:18px; } //grammar 1 .study{ &:extend(.test); ba 阅读全文
posted @ 2017-01-18 11:36 YanEr、 阅读(279) 评论(0) 推荐(0) 编辑