我正在嘗試更改此鏈接的文本顏色,我正在使用twitter引導程序模板。我可以更改此文本的大小,字體,填充和背景顏色,但我無法更改它自己的文本顏色。我也在使用我上線的字體。更改文本顏色CSS3
HTML:
<nav class="navbar navbar-inverse navbar-fixed-top" role="navigation">
<div class="container">
<div class="navbar-header">
<button type="button" class="navbar-toggle" data-toggle="collapse" data-target=".navbar-ex1-collapse">
<span class="sr-only">Toggle navigation</span>
<span class="icon-bar"></span>
<span class="icon-bar"></span>
<span class="icon-bar"></span>
</button>
<!-- You'll want to use a responsive image option so this logo looks good on devices - I recommend using something like retina.js (do a quick Google search for it and you'll find it) -->
@Html.ActionLink("Fat", "Index", new { controller = "Home" }, new { @class = "navbar-brand" })<br />
@Html.ActionLink("Savage", "Index", new { controller = "Home" }, new { @class = "navbar-brand" })
</div>
CSS:
.navbar-brand {
font-family: 'TribecaRegular';
color: green;
font-size:xx-large;
padding-right: 150px;
}
字體顏色總是灰濛濛從來沒有別的。
我覺得.navbar品牌有它內部的''標籤。如果是這種情況,您需要引用''標籤來更改顏色。 – 2015-02-09 23:45:04