在bootstrap 3.3.6版本dist文件夹中,我有一个index.html文件,该文件包含以下代码,但它们无法正常工作。使用bootstrap文件夹,我们有cs,js,font文件夹和index.html
<!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">
<!-- The above 3 meta tags *must* come first in the head; any other head content must come *after* these tags -->
<title>Bootstrap 101 Template</title>
<!-- Bootstrap -->
<link href="css/bootstrap.min.css" rel="stylesheet">
<!-- HTML5 shim and Respond.js for IE8 support of HTML5 elements and media queries -->
<!-- WARNING: Respond.js doesn't work if you view the page via file:// -->
<!--[if lt IE 9]>
<script src="https://oss.maxcdn.com/html5shiv/3.7.3/html5shiv.min.js"></script>
<script src="https://oss.maxcdn.com/respond/1.4.2/respond.min.js"></script>
<![endif]-->
<!-- jQuery (necessary for Bootstrap's JavaScript plugins) -->
<!--script src="https://ajax.googleapis.com/ajax/libs/jquery/jquery.min.js"></script-->
<script src="js/jquery/jquery.min.js"></script>
<!-- Include all compiled plugins (below), or include individual files as needed -->
<script src="js/bootstrap.min.js"></script>
</head>
<body>
<!--h1 class="text-primary">Hello, world!</h1-->
<div class="container">
<div class="row">
<div class="col-mid-4">Left Side </div>
<div class="col-mid-4">Middle</div>
<div class="col-mid-4">Left Side </div>
</div>
</div>
</body>
</html>
答案 0 :(得分:-1)
使用col-md-*
而不是mid
<link href="css/bootstrap.min.css" rel="stylesheet">
<script src="js/jquery/jquery.min.js"></script>
<script src="js/bootstrap.min.js"></script>
<div class="container">
<div class="row">
<div class="col-md-4">Left Side </div>
<div class="col-md-4">Middle</div>
<div class="col-md-4">Left Side </div>
</div>
</div>
答案 1 :(得分:-1)
这是解决方法:
<!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">
<!-- The above 3 meta tags *must* come first in the head; any other head content must come *after* these tags -->
<title>Bootstrap 101 Template</title>
<!-- Bootstrap -->
<!-- Latest compiled and minified CSS -->
<link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/css/bootstrap.min.css">
<!-- jQuery library -->
<script src="https://ajax.googleapis.com/ajax/libs/jquery/3.3.1/jquery.min.js"></script>
<!-- Latest compiled JavaScript -->
<script src="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/js/bootstrap.min.js"></script></head>
<body>
<!--h1 class="text-primary">Hello, world!</h1-->
<div class="container">
<div class="row">
<div class="col-xs-4 col-md-4 col-sm-4 col-lg-4">Left Side </div>
<div class="col-xs-4 col-md-4 col-sm-4 col-lg-4">Middle</div>
<div class="col-xs-4 col-md-4 col-sm-4 col-lg-4">Left Side </div>
</div>
</div>
</body>
</html>