Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
我正在尝试以这种方式为单词着色:
<span style="color: black;"><strong>2679</strong></span> pictures in <span style="color: black;"><strong>73</strong></span> albums!
出于某种原因,第二个跨度在文本中创建了一个换行符。有任何想法吗?
谢谢!
如果您的所有<strong>标签都有黑色文本,那么使用 CSS 来实现它并<span>完全放弃标签:
<strong>
<span>
strong { color: #000; }
或者,如果您只希望某些<strong>标签为黑色,则将一个类应用于这些标签:
strong.black { color: #000; } <strong class="black">2679</strong> pictures in <strong class="black">73</strong> albums!