gpt4 book ai didi

html - 更改文本颜色 CSS3

转载 作者:太空宇宙 更新时间:2023-11-03 23:21:43 25 4
gpt4 key购买 nike

我正在尝试更改此链接的文本颜色,我正在使用 Twitter Bootstrap 模板。我可以更改此文本的大小、字体、填充和背景颜色,但我无法更改它本身的文本颜色。我也在使用我在网上获得的字体。

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;
}

字体颜色永远是灰色的。

最佳答案

你没有点击 span 标签,你需要做这样的事情:

.navbar-brand span{

color:green;

}

关于html - 更改文本颜色 CSS3,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/28421610/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com