使用Eclipse创建的web工程引入bootstrap

xiaoxiao2021-02-28  6

刚开始通过绝对路径尝试了好多次都看不到bootstrap

在这里需要说一下,bootstrap的js是依赖于jquery的,所以在引入bootstrap的js文件前 需要先引入jquery

我这里是通过引入在线文件来实现的。

首先创建了一个html文件:

代码如下:

<!DOCTYPE html><html><head>   <meta charset="utf-8">    <title>Bootstrap 实例 - 响应式的列重置</title>   <link rel="stylesheet" href="http://cdn.static.runoob.com/libs/bootstrap/3.3.7/css/bootstrap.min.css">     <script src="http://cdn.static.runoob.com/libs/jquery/2.1.1/jquery.min.js"></script>   <script src="http://cdn.static.runoob.com/libs/bootstrap/3.3.7/js/bootstrap.min.js"></script></head><body><div class="container">   <div class="row" >      <div class="col-xs-6 col-sm-3"          style="background-color: #dedef8;         box-shadow: inset 1px -1px 1px #444, inset -1px 1px 1px #444;">         <p>Lorem ipsum dolor sit amet, consectetur adipisicing elit.</p>      </div>      <div class="col-xs-6 col-sm-3"          style="background-color: #dedef8;box-shadow:          inset 1px -1px 1px #444, inset -1px 1px 1px #444;">         <p>Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do             eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut             enim ad minim veniam, quis nostrud exercitation ullamco laboris             nisi ut aliquip ex ea commodo consequat.         </p>         <p>Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do             eiusmod tempor incididunt ut.          </p>      </div>      <div class="clearfix visible-xs"></div>      <div class="col-xs-6 col-sm-3"          style="background-color: #dedef8;         box-shadow:inset 1px -1px 1px #444, inset -1px 1px 1px #444;">         <p>Ut enim ad minim veniam, quis nostrud exercitation ullamco             laboris nisi ut aliquip ex ea commodo consequat.          </p>      </div>      <div class="col-xs-6 col-sm-3"          style="background-color: #dedef8;box-shadow:          inset 1px -1px 1px #444, inset -1px 1px 1px #444;">         <p>Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do             eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut             enim ad minim          </p>      </div>   </div></div> <h2>图标</h2>      <p>插入图标:</p>            <p>云图标: <span class="glyphicon glyphicon-cloud"></span></p>            <p>信件图标: <span class="glyphicon glyphicon-envelope"></span></p>                  <p>搜索图标: <span class="glyphicon glyphicon-search"></span></p>      <p>打印图标: <span class="glyphicon glyphicon-print"></span></p>            <p>下载图标:<span class="glyphicon glyphicon-download"></span></p>      </body></html>

显示结果:

转载请注明原文地址: https://www.6miu.com/read-2000292.html

最新回复(0)