【问题标题】:How do I style this text to be bold?如何将此文本设置为粗体?
【发布时间】:2021-12-31 19:43:37
【问题描述】:

我想弄清楚如何在 Shopify 中将此文本设置为粗体?

 <center> <font color="black">Free Shipping & Returns</font> <center>

我也希望它适应相同的排版,但不知道该怎么做。目前我在 product-template.liquid 文件中

【问题讨论】:

标签: html css


【解决方案1】:

你可以做 &lt;center&gt; &lt;font color="black; font-weight: bold"&gt;Free Shipping &amp; Returns&lt;/font&gt; &lt;center&gt;应该可以工作

【讨论】:

    【解决方案2】:

    &lt;center&gt;&lt;b&gt;Free Shipping &amp; Returns&lt;/b&gt;&lt;center&gt;

    【讨论】:

      【解决方案3】:

      您可以通过 font-weight 属性使用 CSS 来实现此目的。

      <center style="color: black; font-weight: heavy;">Free Shipping & Returns<center>
      

      此外,只需使用原始 HTML:

      <center><font color="black"><strong>Free Shipping & Returns</strong></font></center>
      

      【讨论】:

      • HTML 版本完美运行!谢谢!
      【解决方案4】:

      1.您可以通过 2 种方式加粗文本

      方式 - 1

      &lt;center&gt; &lt;font color="black;"&gt;&lt;b&gt;Free Shipping &amp; Returns&lt;/b&gt;&lt;/font&gt; &lt;center&gt;

      方式 - 2

      &lt;center&gt; &lt;font color="black;"&gt;&lt;strong&gt;Free Shipping &amp; Returns&lt;/strong&gt;&lt;/font&gt; &lt;center&gt;

      【讨论】:

        【解决方案5】:

        3 种方法可以达到您想要的结果

        第一个选项

        <center> <font color="black" style="font-weight: bold;"> <center>
        

        第二个选项

        <center> <font color="black"><b>Free Shipping & Returns</b></font> <center>
        

        第三个选项

        <center> <font color="black"><strong>Free Shipping & Returns</strong></font> <center>
        

        【讨论】:

        • 第一个选项需要稍作调整。 (&lt;font color="black" style="font-weight: bold;"&gt;)
        • @phentnil 感谢您指出这一点。
        【解决方案6】:
        font-weight: bold;
        

        <b></b>
        

        【讨论】:

          猜你喜欢
          • 2015-11-20
          • 2013-12-16
          • 2014-09-21
          • 1970-01-01
          • 1970-01-01
          • 2011-07-06
          • 1970-01-01
          • 1970-01-01
          • 2011-03-06
          相关资源
          最近更新 更多