bootstrap.css vs bootstrap.js我应该使用哪一个?

San*_*ram 9 javascript css twitter-bootstrap

这两者有什么区别.我下载了bootstrap.zip,我得到了css和js文件.我应该在html中包含哪一个?

如果我包含bootstrap.css,它会影响我自己的app.css吗?如何同时使用bootstrap.css和我自己的app.css?

由于我完全不知道如何在HTML中使用css和js,我问了这个问题.但是现在我已经明白我需要在index.html中包含bootstrap.css和bootstrap.js.我也想出了如何使用它们.

Gir*_*wda 9

你必须包括文件和jquery.

请仔细阅读bootstrap文档和示例代码.

这就是带有bootstrap的基本网页的样子.

<!DOCTYPE html>
<html>
<head>
<title>Bootstrap 101 Template</title>
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<!-- Bootstrap -->
<link href="css/bootstrap.min.css" rel="stylesheet" media="screen">

<!-- HTML5 shim and Respond.js IE8 support of HTML5 elements and media queries -->
<!--[if lt IE 9]>
  <script src="../../assets/js/html5shiv.js"></script>
  <script src="../../assets/js/respond.min.js"></script>
<![endif]-->
 </head>
 <body>
<h1>Hello, world!</h1>
<!-- jQuery (necessary for Bootstrap's JavaScript plugins) -->
<script src="//code.jquery.com/jquery.js"></script>
<!-- Include all compiled plugins (below), or include individual files as needed -->
<script src="js/bootstrap.min.js"></script>
 </body>
</html>
Run Code Online (Sandbox Code Playgroud)


Don*_*pin 8

你有两个不同的bootstrap lib.一个用CSS,另一个用JS.

CSS lib包含bootstrap样式的基础:http://getbootstrap.com/2.3.2/base-css.html

js包含一些图形组件和动画:http://getbootstrap.com/2.3.2/components.html