简体   繁体   中英

How can I load a custom CSS for a few lines in my code?

I want to use Bootstrap for dropdown content, and it works perfectly fine, however, it than overrides the default CSS I'm using on my website and most of the things are looking awful below that button. I have tried to unload the CSS (Bootstrap) after I don't need it with the following code, but it is not working.

<script type="text/javascript">
  jQuery('link[href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/css/bootstrap.min.css"]').prop('disabled', true);
</script>

Link your default.css file below the bootstrap.css. default.css style definitions will override bootstrap.css

<link href="https://cdn.jsdelivr.net/npm/bootstrap@5.0.0-beta1/dist/css/bootstrap.min.css">
<link rel="stylesheet" href="default.css">

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM