【发布时间】:2015-12-25 23:46:12
【问题描述】:
我正在尝试让活动类与我的 Bootstrap 导航栏一起使用,但它不起作用(我假设是因为我对导航类进行了太多 CSS 更改)。
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html><head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1">
<title>Home</title>
<link rel="stylesheet" href="css/bootstrap.min.css">
<link rel="stylesheet" href="css/jquery.mobile-1.4.5.min.css">
<link href="css/base.css" type="text/css" rel="stylesheet">
<script src="js/bootstrap.min.js" type="text/javascript"></script>
<script src="js/jquery-1.9.0.min.js" type="text/javascript"></script>
</head>
<style>
#nav {
white-space: nowrap;
width: 100%;
float: left;
margin-left: auto;
margin-right: auto;
margin-bottom:10px;
display: inline;
padding: 0;
background-color: #FFFFFF;
border-bottom: thin solid #000099;
padding-bottom: 4px;
text-align: center;
}
#nav ul {
list-style: none;
width: 100%;
margin: 0 auto;
display: inline-block;
vertical-align: top;
padding: 0;
}
#nav li {
display: inline-block
}
#nav li a {
display: block;
padding: 8px 15px;
text-decoration: none;
text-align: center;
font-weight: bold;
color: #424245;
border-right: 1px solid #ccc;
}
#nav li:last-child a {
border-right:none;
}
</style>
<div id="nav">
<ul>
<li class="active"><a href="#">Find It Myself</a></li>
<li><a href="ask_the_community.html">Ask The Community</a></li>
<li><a href="get_help.html">Get Help</a></li>
</ul>
</div>
代码笔here。活跃的班级什么都不做。最重要的是,我想让活动类看起来像这样:
下面的蓝色条,而不是 Bootstrap 具有的标准深灰色背景。我会满足于只使用深灰色背景,但希望获得有关如何完成蓝色条的建议。
谢谢。
【问题讨论】:
标签: html css twitter-bootstrap