<p id="g32nn"></p>
    1. <acronym id="g32nn"><strong id="g32nn"></strong></acronym>
      <pre id="g32nn"></pre>

      <table id="g32nn"><option id="g32nn"></option></table>

          css系列---【如何讓文字水平垂直居中?】
          2022-08-30 00:04:23

          1.如何讓文字水平垂直居中?

          <!DOCTYPE html>
          <html lang="en">
          <head>
          <meta charset="UTF-8" />
          <meta name="viewport" content="width=device-width, initial-scale=1.0" />
          <title>css練習</title>
          <style>
          a {
          /* 行內元素轉行內塊級元素,因為行內元素無法改變寬高,若想改變,必須先轉成行內塊級元素 */
          display: inline-block;
          width: 70px;
          /* 行高等于高度,文字才會垂直居中 */
          height: 30px;
          line-height: 30px;
          background-color: aqua;
          /* 去掉下劃線 */
          text-decoration: none;
          /* 設置水平居中 */
          text-align: center;
          }
          /* 鼠標滑過效果 */
          a:hover {
          color: #ff00ff;
          background-color: #fff;
          }
          </style>
          </head>
          <body>
          <a href="#">新聞</a>
          <a href="#">體育</a>
          <a href="#">新浪</a>
          </body>
          </html>

          2.如何測試行高?

          ps中有個切片工具

          本文摘自 :https://blog.51cto.com/u


          更多科技新聞 ......

          97久久久久人妻精品专区_国产成人精品视频导航_国产色诱视频在线播放网站_97午夜理论电影影院
          <p id="g32nn"></p>
          1. <acronym id="g32nn"><strong id="g32nn"></strong></acronym>
            <pre id="g32nn"></pre>

            <table id="g32nn"><option id="g32nn"></option></table>