logo
  • 教程列表
  • SO官方文档
  • 变量
    • Less 变量介绍
    • 颜色操作
    • 连接两个或多个变量的值
    • 引用 CSS 函数中的变量
    • 变量可以使你的递归工作变得简单
  1. StackOverflow 文档
  2. less 教程
  3. 变量
  4. 变量可以使你的递归工作变得简单

变量可以使你的递归工作变得简单

Created: November-22, 2018

变量声明

@buttonColor: #FF0000;

/ *现在你可以使用带有 css 函数的 @buttonColor 变量。 * /

.product.into.detailed {
    additional-attributes{
        .lib-table-button(
         background-color: @buttonColor;
         );
    }
}

函数 lib-tabgle-button 使用变量来设置背景颜色

  • 引用 CSS 函数中的变量

Copyright © 2018. All right reserved

tastones.com 备案号:鲁ICP备18045372号-1

  • 关于我们
  • 免责声明