【问题标题】:How to control spacing in header text?如何控制标题文本中的间距?
【发布时间】:2021-01-01 02:13:43
【问题描述】:

是否可以对整个标题文本应用间距,并有一个特殊的标题不具有长间距。它很难解释,所以下面的代码:

得到:

Support       30       FREE       Tips       Guest001

需要:

Support       30 FREE Tips       Guest001

代码在这里:

body {
    background-color: #6B6B6B;
  }
    p.space { /* header space lenght */
    word-spacing: 50px;
}
<p class="space">
<a href="support.htm">Support</a> 
30 FREE Tips
Guest001</p>

【问题讨论】:

  • 我无法理解你的问题:(
  • 你能解释更多吗?得到:支持 30 个免费提示 Guest001 需要:支持 30 个免费提示 Guest001 在我看来是一样的。

标签: html css hyperlink spacing


【解决方案1】:

在文本中添加span

<span>30 FREE Tips</span>

然后将word-spacing添加为0px

p span{ word-spacing: 0px;}

body {
  background-color: #6B6B6B;
}
p.space { 
  word-spacing: 50px;
}
p span{ 
  word-spacing: 0px;
}
<p class="space">
  <a href="support.htm">Support</a> 
  <span>30 FREE Tips</span>
  Guest001
</p>

【讨论】:

  • 你想要这样的@Stew吗?
猜你喜欢
  • 2010-12-02
  • 2015-03-27
  • 2014-09-14
  • 2015-08-07
  • 2018-06-01
  • 2021-08-17
  • 2021-11-25
  • 1970-01-01
  • 1970-01-01
相关资源
最近更新 更多