Twitter bootstrap 自举支架跨度
超级初学者在这方面,但我有引导的问题,我无法找到在线答案。我创建的跨距不会分成12个部分。它们看起来都是统一的,但我知道我已经正确安装了它,因为我能够更早地创建按钮。救命啊!我做错了什么Twitter bootstrap 自举支架跨度,twitter-bootstrap,Twitter Bootstrap,超级初学者在这方面,但我有引导的问题,我无法找到在线答案。我创建的跨距不会分成12个部分。它们看起来都是统一的,但我知道我已经正确安装了它,因为我能够更早地创建按钮。救命啊!我做错了什么 <!DOCTYPE html> <html lang="en"> <head> <meta charset="utf-8"> <meta http-equiv="X-UA-Compatible" content="IE=edge"> <meta
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Scaffolding: Fixed</title>
<!-- Bootstrap -->
<link rel="stylesheet" href="//netdna.bootstrapcdn.com/bootstrap/3.1.1/css/bootstrap.min.css">
<style>
.span12{
background: black;
color: white;
padding: 20px 0;
text-align: center;
}
.span6{
background: blue;
color: white;
padding: 20px 0;
text-align: center;
margin-top: 15px;
}
.span3{
background: purple;
color: white;
padding: 20px 0;
text-align: center;
margin-top: 15px;
}
</style>
</head>
<body>
<div class = "container">
<div class = "row">
<div class = "span12">Span12</div>
</div>
<div class = "row">
<div class = "span6">Span6</div>
<div class = "span6">Span6</div>
</div>
<div class = "row">
<div class = "offset 2 span3">Span3</div>
<div class = "span3">Span3</div>
<div class = "span3">Span3</div>
<div class = "span3">Span3</div>
</div>
</div>
<script src="https://ajax.googleapis.com/ajax/libs/jquery/1.11.0/jquery.min.js"> </script>
<script src="//netdna.bootstrapcdn.com/bootstrap/3.1.1/js/bootstrap.min.js"></script>
</body>
</html>
脚手架:固定式
.span12{
背景:黑色;
颜色:白色;
填充:20px0;
文本对齐:居中;
}
.span6{
背景:蓝色;
颜色:白色;
填充:20px0;
文本对齐:居中;
边缘顶部:15px;
}
.span3{
背景:紫色;
颜色:白色;
填充:20px0;
文本对齐:居中;
边缘顶部:15px;
}
Span12
Span6
Span6
Span3
Span3
Span3
Span3
我认为您使用的是Bootstrap 3,在最新版本的Bootstrap中,网格系统没有span类。
请使用以下内容:
<div class="row">
<div class="col-lg-12">col-lg-12</div>
</div>
col-lg-12
欢迎@doralchan。如果答案对您有帮助,您可以接受:)