How to apply two CSS classes to a single element

前端 未结 7 710
Happy的楠姐
Happy的楠姐 2020-11-27 13:52

Can i apply 2 classes to a single div or span or any html element? For example:

aa

I tried and

相关标签:
7条回答
  • 2020-11-27 14:52

    .color
    {background-color:#21B286;}
    .box
    {
      width:"100%";
      height:"100px";
      font-size: 16px;
      text-align:center;
      line-height:1.19em;
    }
    .box.color
    {
    width:"100%";
    height:"100px";
    font-size:16px;
    color:#000000;
    text-align:center;
    }
    <div class="box color">orderlist</div>

    .color
    {background-color:#21B286;}
    .box
    {
      width:"100%";
      height:"100px";
      font-size: 16px;
      text-align:center;
      line-height:1.19em;
    }
    .box.color
    {
    width:"100%";
    height:"100px";
    font-size:16px;
    color:#000000;
    text-align:center;
    }
    <div class="box color">orderlist</div>

    .color
    {background-color:#21B286;}
    .box
    {
      width:"100%";
      height:"100px";
      font-size: 16px;
      text-align:center;
      line-height:1.19em;
    }
    .box.color
    {
    width:"100%";
    height:"100px";
    font-size:16px;
    color:#000000;
    text-align:center;
    }
    <div class="box color">orderlist</div>

    0 讨论(0)
提交回复
热议问题