我是新的使用引导版本3和我试图改变默认的导航栏颜色的引导Yeti主题,http://bootswatch.com/yeti/,我的ASP web应用程序在VS 2013年。我下载了bootstrap.css和bootstrap.min.css文件并将它们复制到我的项目中。
我希望将导航条背景颜色更改为green: 93c951,将导航条文本更改为blue: 0f74bc.。
我已经按照这里的说明Change navbar color in Twitter Bootstrap 3的正确答案,但肚脐颜色保持不变,当我改变.navbar-default颜色设置和其他肚脐设置更改。我在创建Visual应用程序时在bootstrap.css文件夹下对Content文件进行了更改。
我需要做些什么来做这些改变呢?
Site.Master
<!DOCTYPE html>
<html lang="en">
<head runat="server">
<meta charset="utf-8" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<title><%: Page.Title %> - Ecoline</title>
<asp:PlaceHolder runat="server">
<%: Scripts.Render("~/bundles/modernizr") %>
</asp:PlaceHolder>
<webopt:BundleReference runat="server" Path="~/Content/css" />
<link href="~/favicon.ico" rel="shortcut icon" type="image/x-icon" />
</head>发布于 2014-04-08 09:27:40
嗯,可能是原来的引导样式正在覆盖您的自定义样式。尝试替换/删除从引导程序下载的样式--或者使用!important (如果必须的话)。
.navbar-default {
background-color: #93c951 !important;
border-color: #222222;
}
.navbar-default .navbar-nav > li > a {
color: blue;
}
// Also don't forget to change the hover styles as well
.navbar-default .navbar-nav > li > a:hover, .navbar-default .navbar-nav > li > a:focus {
color: blue;
background-color: #93c951 !important;
}
// And the brand colour
.navbar-default .navbar-brand {
color: blue;
} https://stackoverflow.com/questions/22931723
复制相似问题