下载了一个免费的 bootstrap 模板,并try 使用自定义的css文件更改样式,但模板中的css没有更改它. try 更改一些背景 colored颜色 和文本 colored颜色 没有什么效果,为什么这是不起作用的,可以做什么,模板阻止,你不能做更改?
这只是示例的一小部分,css和html太大了,无法上传
<!DOCTYPE html>
<head>
<link rel="stylesheet" href="assets/css/style.css" />
<link rel="stylesheet" href="assets/css/custom.css" />
</head>
<body>
<div class="container">
<div class="col-lg-4 my-3">
<div class="card hover-top">
<div class="card-body">
<span class="bg-white font-w-500 py-1 lh-1 me-1 mb-1">
change style text
</span>
<div class="d-flex align-items-end pt-4">
<div class="display-7 m-0 font-w-700 lh-1">Display Text</div>
</div>
</div>
</div>
</div>
</div>
/** style.css **/
/********** Template CSS **********/
.card {
position: relative;
display: flex;
flex-direction: column;
min-width: 0;
word-wrap: break-word;
background-color: #ffffff;
background-clip: border-box;
border: 0 solid #eff2f7;
border-radius: 0.3rem; }
.card > hr {
margin-right: 0;
margin-left: 0; }
.card > .list-group {
border-top: inherit;
border-bottom: inherit; }
.card > .list-group:first-child {
border-top-width: 0;
border-top-left-radius: 0.3rem;
border-top-right-radius: 0.3rem; }
.card > .list-group:last-child {
border-bottom-width: 0;
border-bottom-right-radius: 0.3rem;
border-bottom-left-radius: 0.3rem; }
.card > .card-header + .list-group,
.card > .list-group + .card-footer {
border-top: 0; }
.card-body {
flex: 1 1 auto;
padding: 1.75rem 1.75rem; }
.card-title {
margin-bottom: 0.5rem; }
.card-subtitle {
margin-top: -0.25rem;
margin-bottom: 0; }
.card-text:last-child {
margin-bottom: 0; }
.card-link + .card-link {
margin-left: 1.75rem; }
.card-header {
padding: 0.875rem 1.75rem;
margin-bottom: 0;
background-color: transparent;
border-bottom: 0 solid #eff2f7; }
.card-header:first-child {
border-radius: 0.3rem 0.3rem 0 0; }
.card-footer {
padding: 0.875rem 1.75rem;
background-color: transparent;
border-top: 0 solid #eff2f7; }
.card-footer:last-child {
border-radius: 0 0 0.3rem 0.3rem; }
/** custom.css try this **/
.newtextstyle{
color: red;
font-size:1.5em;
}
/** custom.css and this **/
.newtextstyle{
color: red !important;
font-size:1.5em !important;
}
/* try to change this with no effect */
<span class="bg-white font-w-500 py-1 lh-1 me-1 mb-1 newtextstyle">
change style text
</span>