[英]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.我想将 Bootstrap 用于下拉内容,它工作得非常好,但是,它会覆盖我在我的网站上使用的默认 CSS 并且大多数事情在该按钮下方看起来很糟糕。 I have tried to unload the CSS (Bootstrap) after I don't need it with the following code, but it is not working.在不需要使用以下代码之后,我尝试卸载 CSS(引导程序),但它不起作用。
<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.在 bootstrap.css 下方链接您的 default.css 文件。 default.css style definitions will override bootstrap.css default.css 样式定义将覆盖 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">
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.