質問

Should I include two css file or one is enough?

<link rel="stylesheet" href="bootstrap/css/bootstrap.min.css" media="all" />
<link rel="stylesheet" href="bootstrap/css/bootstrap-responsive.min.css" media="all" />

OR

<link rel="stylesheet" href="bootstrap/css/bootstrap-responsive.min.css" media="all" />
役に立ちましたか?

解決

Bootstrap 2

You should include both, the first one defines all the styles for html elements whilst the second one adds responsiveness to the layout.

Bootstrap 3

Only one css file will be included.

Happy coding!

他のヒント

Both of the files should be included as of Bootstrap 2.


But with Bootstrap 3 only one css file will be included.

Responsive CSS is no longer separate and all responsive features are now compiled into the core bootstrap.css file near. Separate files are no longer required, and have thus been removed

Source: https://github.com/twitter/bootstrap/pull/6342

Edit: If you want to include bootstrap 3 css you can use this CDN version:

<link rel="stylesheet" type="text/css" 
   href="//netdna.bootstrapcdn.com/bootstrap/3.1.1/css/bootstrap.min.css"/>

You can use the official Twitter Bootstrap download helper in order to have one CSS file named bootstrap.css (resp. bootstrap.min.css) which will contain the following CSS parts:

  • Scaffolding
  • Base CSS
  • Components
  • JS Components
  • Miscellaneous
  • Responsive
ライセンス: CC-BY-SA帰属
所属していません StackOverflow
scroll top