Home > Blockchain >  how bootstrap css link change to bootstrap.min.css
how bootstrap css link change to bootstrap.min.css

Time:11-05

i try to change this css link

    <link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/[email protected]/dist/css/bootstrap.min.css" integrity="sha384-Gn5384xqQ1aoWXA 058RXPxPg6fy4IWvTNh0E263XmFcJlSAwiGgFAW/dAiS6JXm" crossorigin="anonymous">

to

 <link rel="stylesheet" href="css/bootstrap.min.css" integrity="sha384-Gn5384xqQ1aoWXA 058RXPxPg6fy4IWvTNh0E263XmFcJlSAwiGgFAW/dAiS6JXm" crossorigin="anonymous">

i go to https://cdn.jsdelivr.net/npm/[email protected]/dist/css/bootstrap.min.css and copy all codes and paste into bootstrap.min.css file ,
when i call this file from index page , this file not work, no bootstrap feature see. why?

CodePudding user response:

You can give the link tag an id. In Javascript you get the tag with that id. Then you can change the href attribute. With this some websites switch between dark and light themes.

CodePudding user response:

This can be because bootstrap not only uses a single CSS file but it has a complete library of different files including CSS and JS that you don't attach as a linked file but surely it accesses it to work properly. Go to Bootstrap page and download Compiled CSS and then paste it in your project and link it. For your convenience I attached the same version you used in your code. But if you want latest version of it, go to this link.

  • Related