你能帮我解决这个简单的 html 代码吗?
can u help me with this simple html code?
我在 HTML 中有一个 h1 元素 "THE COOL THE MINIMAL" 如何更改 "THE COOL" 文本颜色为绿色,"THE MINIMAL" 文本颜色为白色。我是初学者,求助。
我们可以将单词拆分为 2 并将它们附加到 span 标签中,并给 span 标签一个 class 任何你想要的 属性
<style>
.green-color {
color: green
}
.white-color {
color: white
}
</style>
<h1><span class="green-color">THE COOL</span> <span class="white-color">THE MINIMAL</span></h1>
我在 HTML 中有一个 h1 元素 "THE COOL THE MINIMAL" 如何更改 "THE COOL" 文本颜色为绿色,"THE MINIMAL" 文本颜色为白色。我是初学者,求助。
我们可以将单词拆分为 2 并将它们附加到 span 标签中,并给 span 标签一个 class 任何你想要的 属性
<style>
.green-color {
color: green
}
.white-color {
color: white
}
</style>
<h1><span class="green-color">THE COOL</span> <span class="white-color">THE MINIMAL</span></h1>