Most common way of writing a HTML table with vertical headers?

前端 未结 5 744
情话喂你
情话喂你 2020-12-04 11:04

Hi all it\'s been a while since I\'ve asked something, this is something that has been bothering me for a while, the question itself is in the title:

5条回答
  •  孤城傲影
    2020-12-04 12:03

    div.vertical {
      margin-left: -85px;
      position: absolute;
      width: 215px;
      transform: rotate(-90deg);
      -webkit-transform: rotate(-90deg);
      /* Safari/Chrome */
      -moz-transform: rotate(-90deg);
      /* Firefox */
      -o-transform: rotate(-90deg);
      /* Opera */
      -ms-transform: rotate(-90deg);
      /* IE 9 */
    }
    
    th.vertical {
      height: 220px;
      line-height: 14px;
      padding-bottom: 20px;
      text-align: left;
    }
    Really long and complex title 1
    Really long and complex title 2
    Really long and complex title 3
    Example a, b, c 1, 2, 3

提交回复
热议问题