【问题标题】:What is the best way to align text at the center of the HTML在 HTML 的中心对齐文本的最佳方法是什么
【发布时间】:2015-03-24 19:14:50
【问题描述】:

在 HTML 的中心对齐文本(水平和垂直对齐)以在 Windows 窗体的 WebBrowser 控件中表示它的最佳方法是什么?有没有办法做到这一点?

提前致谢。

【问题讨论】:

    标签: html winforms


    【解决方案1】:
    .centered {
        width: 50px;
        height: 50px;
        top: 50%;
        left: 50%;
        position: absolute;
        margin-left: -(50/2)px;
        margin-top: -(50/2)px;
    }
    

    这 50px 可以根据你的选择变化

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 2015-10-28
      • 2012-01-06
      • 2012-01-01
      • 2021-12-20
      • 1970-01-01
      • 2010-10-18
      • 2020-04-07
      • 2020-03-27
      相关资源
      最近更新 更多