我从http://getbootstrap.com/版本4.0手动下载了引导程序但是我不知道为什么我的导航,XS,面板类不起作用我在boostrap.min.css中搜索了xs但是找不到它。这有什么问题但sm,md,lg类都运行正常。我不知道为什么有些类正在运行&为什么有些课程没有工作,我正式下载了样式表路径也很完美,从最近3周开始,我认为是任何解决方案。 这是我的代码:
<!DOCTYPE html>
<html lang="en">
<head>
<title>Bootstrap Example</title>
<meta charset="UTF-8">
<meta http-equiv="X-UA-compatible" Content="IE-edge">
<meta name="viewport" content="width=device-width, initial-scale=1">
<link href="css/bootstrap.min.css" rel="stylesheet" type="text/css">
</head>
<body>
<div class="navbar navbar-default" role="navigation">
<div class="navbar-header">
<button type="button" class="navbar-toggle" data-toggle="collapse" data-target=".navbar-collapse">
<span class="sr-only">Toggle navigation</span>
<span class="fa fa-align-justify"></span>
</button>
<span class="navbar-brand">Diffie</span>
</div>
<div class="navbar-collapse collapse">
<ul class="nav navbar-nav">
<li><a href="#">Link1</a></li>
<li><a href="#">Link2</a></li>
<li><a href="#">Link3</a></li>
<li><a href="#">Link4</a></li>
<li><a href="#">Link5</a></li>
</ul>
</div>
</div>
<div class="container">
<div class="row">
<div class="col-sm-6">
<p class="hidden-xs"><b>AAA Ipsum is simply dummy text of the printing</b> and typesetting industry. Lorem Ipsum has been the industry's standard dummy text ever since the 1500s, when an unknown printer took a galley of type and scrambled it to make a type specimen book.</p>
</div>
<div class="col-sm-6">
<p>AAA Ipsum is simply dummy text of the printing and typesetting industry. Lorem Ipsum has been the industry's standard dummy text ever since the 1500s, when an unknown printer took a galley of type and scrambled it to make a type specimen book.</p>
</div>
</div>
<div class="row">
<div class="col-sm-6 col-md-4 col-lg-3">
<div style="width: auto;height: auto;background-color: gray;color: white;padding: 5px;margin-bottom: 10px;">
<p>Lorem Ipsum is simply dummy text of the printing and typesetting industry. Lorem Ipsum has been the industry's standard dummy text ever since the 1500s, when an unknown printer took a galley of type and scrambled it to make a type specimen book.</p>
</div>
</div>
<div class="col-sm-6 col-md-4 col-lg-3">
<div style="width: auto;height: auto;background-color: gray;color: white;padding: 5px;margin-bottom: 10px;">
<p>Lorem Ipsum is simply dummy text of the printing and typesetting industry. Lorem Ipsum has been the industry's standard dummy text ever since the 1500s, when an unknown printer took a galley of type and scrambled it to make a type specimen book.</p>
</div>
</div>
<div class="col-sm-6 col-md-4 col-lg-3">
<div style="width: auto;height: auto;background-color: gray;color: white;padding: 5px;margin-bottom: 10px;">
<p>Lorem Ipsum is simply dummy text of the printing and typesetting industry. Lorem Ipsum has been the industry's standard dummy text ever since the 1500s, when an unknown printer took a galley of type and scrambled it to make a type specimen book.</p>
</div>
</div>
<div class="col-sm-6 col-md-4 col-lg-3">
<div style="width: auto;height: auto;background-color: gray;color: white;padding: 5px;margin-bottom: 10px;">
<p>Lorem Ipsum is simply dummy text of the printing and typesetting industry. Lorem Ipsum has been the industry's standard dummy text ever since the 1500s, when an unknown printer took a galley of type and scrambled it to make a type specimen book.</p>
</div>
</div>
<div class="col-sm-6 col-md-4 col-lg-3">
<div style="width: auto;height: auto;background-color: gray;color: white;padding: 5px;margin-bottom: 10px;">
<p>Lorem Ipsum is simply dummy text of the printing and typesetting industry. Lorem Ipsum has been the industry's standard dummy text ever since the 1500s, when an unknown printer took a galley of type and scrambled it to make a type specimen book.</p>
</div>
</div>
<div class="col-sm-6 col-md-4 col-lg-3">
<div style="width: auto;height: auto;background-color: gray;color: white;padding: 5px;margin-bottom: 10px;">
<p>Lorem Ipsum is simply dummy text of the printing and typesetting industry. Lorem Ipsum has been the industry's standard dummy text ever since the 1500s, when an unknown printer took a galley of type and scrambled it to make a type specimen book.</p>
</div>
</div>
<div class="col-sm-6 col-md-4 col-lg-3">
<div style="width: auto;height: auto;background-color: gray;color: white;padding: 5px;margin-bottom: 10px;">
<p>Lorem Ipsum is simply dummy text of the printing and typesetting industry. Lorem Ipsum has been the industry's standard dummy text ever since the 1500s, when an unknown printer took a galley of type and scrambled it to make a type specimen book.</p>
</div>
</div>
<div class="col-sm-6 col-md-4 col-lg-3">
<div style="width: auto;height: auto;background-color: gray;color: white;padding: 5px;margin-bottom: 10px;">
<p>Lorem Ipsum is simply dummy text of the printing and typesetting industry. Lorem Ipsum has been the industry's standard dummy text ever since the 1500s, when an unknown printer took a galley of type and scrambled it to make a type specimen book.</p>
</div>
</div>
</div>
</div>
</body>
</html>
答案 0 :(得分:0)
bootstrap 4.0版本不再使用-xs。只使用col-2,或任何应该给出相同结果的东西。
来自bootstrap网站:
...我们从最低(超小)断点中删除了-xs中缀。 xs不是一个非常像sm,md,lg和xl的响应断点,因为它不会以最小宽度向上开始应用样式。它只适用于所有内容,因为没有绑定的@media查询。
答案 1 :(得分:0)
我想你也忘了标题上的一些书店:
<script src="https://code.jquery.com/jquery-3.1.1.slim.min.js" integrity="sha384-A7FZj7v+d/sdmMqp/nOQwliLvUsJfDHW+k9Omg/a/EheAdgtzNs3hpfag6Ed950n" crossorigin="anonymous"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/tether/1.4.0/js/tether.min.js" integrity="sha384-DztdAPBWPRXSA/3eYEEUWrWCy7G5KFbe8fFjk5JAIxUYHKkDx6Qin1DkWx51bBrb" crossorigin="anonymous"></script>
<script src="https://maxcdn.bootstrapcdn.com/bootstrap/4.0.0-alpha.6/js/bootstrap.min.js" integrity="sha384-vBWWzlZJ8ea9aCX4pEW3rVHjgjt7zpkNpZk+02D9phzyeVkE+jo0ieGizqPLForn" crossorigin="anonymous"></script>
&#13;