2016-12-05 287 views
-3

我試圖讓.io綠色,但不知道如何通過CSS做改變顏色

#logo { 
 
    border-style: dashed; 
 
    border-color: red; 
 
    color: red; 
 
    border-width: 3px; 
 
}
<a id="logo" class="navbar-brand" href="#">Expired.io</a>

回答

0

你可以把.IO在span元素和風格。

#logo { 
 
    border-style: dashed; 
 
    border-color: red; 
 
    color: red; 
 
    border-width: 3px; 
 
} 
 
#logo span { 
 
    color: green; 
 
}
<a id="logo" class="navbar-brand" href="#">Expired<span>.io</span></a>

0

.span-green { 
 
    color: green; 
 
}
<a id="logo" class="navbar-brand" href="#">Expired<span class="span-green">.io</span></a>

0

也許你可以試試下面這個,這很簡單,只需添加一個新的HTML標籤。

.someClass { 
 
    color: red; 
 
}
<a id="logo" class="navbar-brand" href="#">Expired<span class="someClass">.io</span></a>