how to rotate text left 90 degree and cell size is adjusted according to text in html

后端 未结 4 583
别跟我提以往
别跟我提以往 2020-11-27 15:51

Suppose i have table with some rows and column,so i want to rotate text in cells something like this
: \"enter

4条回答
  •  悲哀的现实
    2020-11-27 16:43

    Without calculating height. Strict CSS and HTML. only for Chrome, because the chrome isn't able change text direction for .

    th 
    {
      vertical-align: bottom;
      text-align: center;
    }
    
    th span 
    {
      -ms-writing-mode: tb-rl;
      -webkit-writing-mode: vertical-rl;
      writing-mode: vertical-rl;
      transform: rotate(180deg);
      white-space: nowrap;
    }
    Rotated text by 90 deg.

提交回复
热议问题