当前位置: 动力学知识库 > 问答 > 编程问答 >

javascript - bootstrap.css vs bootstrap.js which one should I use?

问题描述:

What is the difference between these two. I downloaded bootstrap.zip and I got both css and js files. Which one should I include in html?

If I include bootstrap.css, will it affect my own app.css? How to make use of both bootstrap.css and my own app.css together?

As I was totally unaware of how to use css and js in HTML, I asked this question.

But now I have understood that I need to include both bootstrap.css and bootstrap.js in my index.html. I also have figured out how to use them.

网友答案:

You have two differents bootstrap lib. One with CSS and one with JS.

The CSS lib contain base of bootstrap style : http://getbootstrap.com/2.3.2/base-css.html

And the js contain some graphics components and animations : http://getbootstrap.com/2.3.2/components.html

网友答案:

You have to include both files and also jquery.

Please go through the bootstrap documentation and sample codes.

This is how your basic webpage with bootstrap looks like.

<!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>
分享给朋友:
您可能感兴趣的文章:
随机阅读: