How to pass parameters to css classes

前端 未结 8 2104
我在风中等你
我在风中等你 2020-12-08 09:57

I want to know is it possible to add some flexibility to css via this:

where .round i

8条回答
  •  旧巷少年郎
    2020-12-08 10:17

    Maybe what you want is like this

    CSS

    .round {
      border-radius: 4px; /*it's default when you juse using .round*/
    }
    .round.five {
      border-radius: 5px;
    }
    .round.ten {
      border-radius: 10px;
    }
    

    HTML

    something

提交回复
热议问题