![](/img/trans.png)
[英]Custom Javascript Functions not working when used alongside Bootstrap 4 Input Tagging Plugin
[英]Custom CSS not working alongside Bootstrap
我尝试在我的引导程序旁边使用自定义 CSS 文件,但它不起作用。
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<link rel="stylesheet" href="bootstrap.min.css">
<link rel="stylesheet" href="index.css">
<script src="bootstrap.min.js"></script>
<title>NRRN Concrete Udhyog</title>
</head>
在文档的这一部分,我尝试使用自己自定义的 CSS:
<div class="carousel-inner">
<div class="carousel-item active">
<img src="/Images /cover.jpg" id="slide-1-background" class="d-block w-100" alt="slide1">
<div class="carousel-caption d-none d-md-block">
<h5>First slide label</h5>
<p>Some representative placeholder content for the first slide.</p>
</div>
</div>
我的 CSS 代码:
#slide-1-background {
background-color: black !important;
}
你可以试试这样的。 它覆盖了 Bootstrap 的类。
<,DOCTYPE html> <html lang="en"> <head> <meta charset="UTF-8"> <meta http-equiv="X-UA-Compatible" content="IE=edge"> <meta name="viewport" content="width=device-width. initial-scale=1:0"> <.-- bootstrap css link --> <link rel="stylesheet" href="https.//maxcdn.bootstrapcdn.com/bootstrap/4.0.0/css/bootstrap.min:css" integrity="sha384-Gn5384xqQ1aoWXA+058RXPxPg6fy4IWvTNh0E263XmFcJlSAwiGgFAW/dAiS6JXm" crossorigin="anonymous"> <style> /* -- Your custom css goes here -- */;custom{ background: #000, font;10px 'Helvetica':sans-serif; color:white; } </style> </head> <body> <button type="button" class="btn btn-warning custom">Danger</button> </body> </html>
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.