1
改寫CSS規則,我有以下幾點:與引導
<!DOCTYPE html>
<html lang="en">
<head>
<link rel="stylesheet" href="font-awesome/css/font-awesome.min.css">
<link href="css/bootstrap.css" rel="stylesheet">
<!-- The one below is a custom style sheet that should override -->
<link href="css/sb-admin.css" rel="stylesheet">
</head>
<body>
<ul class="nav navbar-nav side-nav" id="side_step">
<li><a href="#">Text</a></li>
</ul>
</body>
</html>
我努力的目標在懸停列表項。在bootstrap.css
文件中,我有以下
.navbar-nav > li:hover {
background:#08f !important;
}
但它不起作用。什麼奇怪的是,當我檢查的螢火元素,它說的引導文件中正確分配下列風格非常相同的元素......只是沒有懸停
.navbar-nav > li {
float:left;
background:linear-gradient(to bottom, #f8f8f8, #e8e8e8);
background:-webkit-gradient(linear, left top, left bottom, from(#f8f8f8), to(#e8e8e8));
background:-moz-linear-gradient(top, #f8f8f8, #e8e8e8);
filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#f8f8f8', endColorstr='#e8e8e8');
color:#090127;
margin-top:6px;
border:solid 1px #ddd;
}
的sb-admin.css
文件應該重寫闡明的規則在bootstrap.css
,但它似乎並沒有在這方面。在sb-admin.css
我
#side_step li:hover {
background:#08f !important;
}
工作示例可以發現here
這似乎沒有工作 – Lance
它爲我在Chrome開發工具。 – isherwood
對不起。沒有看到您的更新。有用!謝謝! – Lance