html - How to use bootstrap without CDN? -
i want use bootstrap on website. first, put cdn in head, , fine. don't want apply bootstrap cdn, download bootstrap file, , put css part in <style>, , put js part in <script>. didn't work, why?
this cdn code:
<link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/css/bootstrap.min.css"> <script src="https://ajax.googleapis.com/ajax/libs/jquery/3.2.0/jquery.min.js"></script> <script src="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/js/bootstrap.min.js">
follow step:
- go https://getbootstrap.com/ , click big "download" button.
- scroll down "compiled css , js" section, click "download" button.
- you'll have file named bootstrap-4.0.0-beta-dist.zip downloaded (according current version).
- extract it. it'll have 2 folders inside: css & js.
- include them on web project directory e.g. in
assets/bootstrap. - include them inside html
<head>script:
<link rel="stylesheet" href="assets/bootstrap/css/bootstrap.min.css"> <script src='assets/bootstrap/js/bootstrap.min.js'></script>
good luck & keep learning!
Comments
Post a Comment