Less 和 Css 上的区别好处

    136

Less 莫过于通过@各种的变量名来进行不同的定义,
之后,再调用它来赋值,甚至可以判断,嵌套,动态计算等功能。
对于 Css 来说,只能固定的使用,不能省去大量重复的属性或者元素值。

@width:99%;
@colorbg:#fff;
@color:#000;
.border1{border:1px solid #000};
#yannis{
    width:@width;
    background:@colorbg;
    color:@color;
       .border1;
}

而其他的 Class 或者 Div 要使用也是如上所示.
但是,在 Css 中,就要不断重复,特别是定义相同的值。

#yannis{
    width:99%;
    background:#fff;
    color:#000;
        border:1px solid #000;
}
#yannis2{
    color:#000;
        border:1px solid #000;
}
Comments | NOTHING

    空空如也!

消息盒子
# 您需要首次评论以获取消息 #
# 您需要首次评论以获取消息 #

只显示最新10条未读和已读信息