超级初学者在这方面,但我有启动问题,我找不到答案的网上。我创建的跨度并不是12的一部分,它们看起来都是统一的,但我知道我已经正确地安装了这个,因为我能够更早地创建按钮。帮助!我做错了什么?
<!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>发布于 2014-03-22 09:17:27
我认为您正在使用引导程序3,在最新版本的引导程序中,网格系统没有span类。改为使用以下文字:
<div class="row">
<div class="col-lg-12">col-lg-12</div>
</div>https://stackoverflow.com/questions/22573239
复制相似问题