Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

what is the difference between bootstrap.min.css and bootstrap.min.js?

what is the difference between bootstrap.min.css and bootstrap.min.js ? Why bootstrap.min.js need to be included?

<link rel="stylesheet" href="http://maxcdn.bootstrapcdn.com/bootstrap/3.3.6/css/bootstrap.min.css">

and

<script src="http://maxcdn.bootstrapcdn.com/bootstrap/3.3.6/js/bootstrap.min.js"></script>
like image 367
vishwa Avatar asked Jan 01 '26 03:01

vishwa


2 Answers

They're both minified versions of the complete Bootstrap style (CSS) and components (JS). You don't need to include the JS to use the Bootstrap styles (responsive grid, buttons, tables, typography, panels, etc..).

However, you do need to include the JS if you want to use the Bootstrap JavaScript components (modal, carousel, data-attributes, scrollspy, tooltop, etc..).

like image 167
Zim Avatar answered Jan 03 '26 17:01

Zim


Bootstrap.min.css contains the CSS necessary for the Bootstrap to work correctly.

Some of the functionality offered by the bootstrap aren't possible though using only plain .css and this is where javascript comes into play.

Bootstrap.min.js contains javascript code necessary for running Bootstrap.

like image 26
Jakub Balhar Avatar answered Jan 03 '26 15:01

Jakub Balhar



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!