簡體   English   中英

添加具有不同顏色的跨度實際上並沒有改變顏色

[英]Adding a span with a different color isn't actually changing the color

我制作了一個小的索引頁面並使用文本和樣式制作了徽標,並添加了一個跨度來更改其中一個單詞的顏色,但實際上並沒有改變。 我不確定為什么。 我用 .highlight 的.highlight做了一個跨度,並為.highlight賦予了特殊的color ,甚至嘗試添加!important但它仍然無法正常工作。

This is the page - https://youssefwaelnasr.github.io/hat-manufacturers/ -- the word "Hat" is in a span with the class of .highlight that has a different color, but it's not working here.

這是 GitHub 存儲庫,其中包含代碼(index.html 和 css/style.css) -https://github.com/youssefwaelnas

提前致謝。

您的 html 無效

 <span class="highlight"></span>Hat</span> Manufacturers

應該

 <span class="highlight">Hat</span> Manufacturers

在 GitHub 文件 (index.html) 第 17 行的代碼中, <span>標記不正確。

替換第17 行

<h1><i class="fab fa-redhat"></i> <span class="highlight"> Hat</span> Manufacturers</h1>

暫無
暫無

聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.

 
粵ICP備18138465號  © 2020-2024 STACKOOM.COM