How to use pure css selector to select hidden element

前端 未结 4 2326
臣服心动
臣服心动 2021-02-18 23:21
AAA
      

I want to u

4条回答
  •  无人共我
    2021-02-18 23:36

    If your design is not really responsive, I mean you can just need to set fixed font-size for the inner span, I think we have a clean solution like this. The idea is to set font-size of the td to 0, it will hide the text node completely:

    .col[style*="display:none"] {
      display:table-cell!important;
      font-size:0;
    }
    .col > span {
      font-size:20px;
    }
    

    Demo.

提交回复
热议问题