zoukankan      html  css  js  c++  java
  • less

     1 /*定义变量*/
     2 @rColor: red;
     3 @gColor: purple;
     4 @bFSize: 100px;
     5 
     6 .box1{
     7   color: @rColor;
     8   font-size: @bFSize;
     9 }
    10 
    11 .box2{
    12   color: @gColor;
    13   font-size: @bFSize;
    14 }
     1 @rColor: red;
     2 @bWith: 200px;
     3 
     4 .box{
     5   background-color: @rColor;
     6    @bWith;
     7   height: @bWith + 100;
     8   h1{
     9      color: green;
    10   }
    11   div{
    12      @bWith / 2;
    13     height: @bWith / 1.5;
    14     background-color: deepskyblue;
    15     h2{
    16       color: goldenrod;
    17     }
    18   }
    19 }
     1 @w: 300px;
     2 @h: 50px;
     3 
     4 h1, h2{
     5   border: 1px solid #000;
     6 }
     7 
     8 h1{
     9    @w - 100;
    10   height: @h + 100;
    11 }
    12 
    13 h2{
    14    @w / 3;
    15   height: @h * 3;
    16 }
     1 .yuanJiao(@radius: 20px, @rotate: 0){
     2    border-radius: @radius;
     3    transform: rotate(@rotate);
     4 }
     5 
     6 .box1, .box2{
     7    200px;
     8   height: 200px;
     9   margin: 10px;
    10 }
    11 
    12 .box1{
    13   background-color: green;
    14   .yuanJiao();
    15 }
    16 
    17 .box2{
    18   background-color: red;
    19   .yuanJiao(60px, 120deg);
    20 }

    http://lesscss.cn/ 上编写了一些函数

     1 .radius(leftTop, @w: 30px){
     2     border-top-left-radius: @w;
     3 }
     4 
     5 .radius(rightTop, @w: 30px){
     6   border-top-right-radius: @w;
     7 }
     8 
     9 .radius(leftBottom, @w: 30px){
    10   border-bottom-left-radius: @w;
    11 }
    12 
    13 .radius(rightBottom, @w: 30px){
    14   border-bottom-right-radius: @w;
    15 }
    16 
    17 .radius(@w: 30px){
    18   border-radius: @w;
    19 }
    20 
    21 
    22 div{
    23    200px;
    24   height: 200px;
    25   margin: 20px;
    26 }
    27 
    28 // .box1{
    29 //   background-color: red;
    30 //   .radius(leftTop);
    31 // }
    32 .box1{
    33   background-color: red;
    34   .radius(leftTop, 100px);
    35 }
    36 
    37 .box2{
    38   background-color: green;
    39   .radius(rightBottom, 100px);
    40 }
    41 
    42 .box3{
    43   background-color: blue;
    44   .radius(leftBottom, 100px);
    45 }
    46 
    47 .box4{
    48   background-color: purple;
    49   .radius(rightBottom, 100px);
    50 }
    1 @import "pipei";
    2 @import "hunhe";
    3 @import "hanshus";
    4 // 引入
    5 @import "qiantao";
    6 /*hhhhhh*/
    7 @import "yunsuan";
  • 相关阅读:
    CocoaPods安装使用及配置私有库及注意点
    CocoaPods 错误 target overrides the `OTHER_LDFLAGS`...
    如何判断ios设备中是否安装了某款应用
    symbol(s) not found for architecture arm64
    所有iOS设备的屏幕分辨率
    iOS禁止多点操作(按钮和Table项)
    计算日期时间间隔:
    "library not found for
    Undefined symbols for architecture i386:和"_OBJC_CLASS_$_xx", referenced from:问题解决方法
    oracle游标(转载)
  • 原文地址:https://www.cnblogs.com/zhangzhengyang/p/11179114.html
Copyright © 2011-2022 走看看