【问题标题】:html center alignhtml居中对齐
【发布时间】:2013-02-22 20:17:21
【问题描述】:

我怎样才能使文本居中但第一个字母开始在同一个地方?

从这里

                                  text 1
                                text text
                             text 2 text text

到这里

                             text 1
                             text text
                             text 2 text text

【问题讨论】:

  • 您可以使用 css 将父 div 居中。见stackoverflow.com/questions/114543/…
  • 请发布您的 HTML。
  • 这是回声的结果' ';
  • 这将刷新许多 url 但结果会像上面的第一个 1 一样,如何使它们像第二个 1 :)

标签: html alignment center


【解决方案1】:

试试这个

<style>
   .center{
      margin: auto auto;
      width: 250px;
   }
</style>


<div class="center">
       Multiline text
       ight here
    </div>

【讨论】:

    【解决方案2】:

    所以你不应该使用对齐中心。但不是一个 div 包含你的文本,你应该有 2 或 3 个 div(这就像列),你的文本将正常显示在里面,左对齐,就像你想要的那样

    【讨论】:

      猜你喜欢
      • 2012-04-27
      • 2012-12-13
      • 1970-01-01
      • 2017-01-26
      • 2017-11-23
      • 2018-05-16
      • 1970-01-01
      • 2012-04-02
      • 2012-09-14
      相关资源
      最近更新 更多