Html 右侧边栏没有';我不想使用Bootstrap.container类
我有一个左右侧边栏。bootstrap容器类可以很好地使用左侧栏和文本包装等功能。 但是右边的边栏不太好用。文本被夹在下面,不能正确包装。我还想隐藏某些媒体点的边栏,并希望容器在该点也能正常工作 有人能给我一些建议,让我的右侧边栏和容器彼此正确地工作吗Html 右侧边栏没有';我不想使用Bootstrap.container类,html,css,twitter-bootstrap,Html,Css,Twitter Bootstrap,我有一个左右侧边栏。bootstrap容器类可以很好地使用左侧栏和文本包装等功能。 但是右边的边栏不太好用。文本被夹在下面,不能正确包装。我还想隐藏某些媒体点的边栏,并希望容器在该点也能正常工作 有人能给我一些建议,让我的右侧边栏和容器彼此正确地工作吗 <!doctype html> <html> <head> <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1"
<!doctype html>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
<title>sidebar test</title>
<link href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/css/bootstrap.min.css" rel="stylesheet" crossorigin="anonymous">
<script src="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/js/bootstrap.min.js" crossorigin="anonymous"></script>
<style>
.sidebar-fixed-left {
width: 200px;
position: fixed;
border-radius: 0;
height: 100%;
}
.sidebar-fixed-left + .container {
padding-left: 220px;
}
.sidebar-fixed-right {
width: 200px;
position: fixed;
border-radius: 0;
height: 100%;
right: 0;
}
.sidebar-fixed-right + .container {
padding-left: 220px;
}
</style>
</head>
<body>
<div class="navbar-inverse sidebar-fixed-left">
</div>
<div class="navbar-inverse sidebar-fixed-right">
</div>
<div class="container">
<div class="row">
<h2>Left and Rigth sidebars (Fixed)</h2>
<p>Left and Right sidebars</p>
</div>
</div>
</body>
</html>
边栏测试
.侧边栏固定在左侧{
宽度:200px;
位置:固定;
边界半径:0;
身高:100%;
}
.侧边栏固定左+.容器{
左侧填充:220px;
}
.侧边栏固定在右侧{
宽度:200px;
位置:固定;
边界半径:0;
身高:100%;
右:0;
}
.侧边栏固定右侧+.容器{
左侧填充:220px;
}
左侧和右侧边栏(固定)
左右侧边栏