如何对齐文本行,使每行文本的中间垂直对齐? [重复]

问题描述 投票:0回答:1
html css
1个回答
-1
投票

您可以在 h3 中创建 div 并将其宽度设置为 100%。

   .Rest{
      color: white;
      font-family: 'Gill Sans', 'Gill Sans MT', Calibri, 'Trebuchet MS', sans-serif;
      font-size: xx-large;
      }

   h3 { text-align: center;}
   
   h3 div {width: 100%;}
<div class="Rest" style="background-color: black;">
     <div class="Rest">
       <h3>
          <div>Adres</div>
          <div>Openingsuren</div>
          <div>+11111111111</div>
        </h3>
      </div>
 </div>

最新问题
© www.soinside.com 2019 - 2024. All rights reserved.