CSS实现文字竖向排列

319 阅读1分钟

方法一:

  <h1>哈哈哈哈哈哈哈</h1>
  <style>
    h1 {
      width: 50px;
      font-size: 50px;
      word-wrap: break-word; //允许长单词换行
    }
  </style>

方法二:

  <h1>哈哈哈哈哈哈哈</h1>
  <style>
    h1 {
      width: 50px;
      font-size: 50px;
      word-wrap: break-word;
      letter-spacing: 20px;
    }
  </style>