gpt4 book ai didi

css - 如何去除引导卡中的白色边框?更改边框颜色不起作用

转载 作者:太空宇宙 更新时间:2023-11-03 20:05:39 24 4
gpt4 key购买 nike

<!Doctype html>
<html5>
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>IBAE-Information Library</title>
<link rel="stylesheet" href="https://stackpath.bootstrapcdn.com/bootstrap/4.1.1/css/bootstrap.min.css">
<link rel="stylesheet" href="/Users/jeevabharathi/Documents/Website/IBAE.css">
<script src="https://unpkg.com/scrollreveal/dist/scrollreveal.min.js"></script>
</head>


<body>
<nav>
<h1 style="font-family:Helvetica;">
<ul class="nav">
<li><a href="#">Menu 1</a>
<ul>
<li><a href="#">Sub-menu Item 1</a></li>
<li><a href="#">Sub-menu Item 2</a></li>
<li><a href="#">Sub-menu Item 3</a></li>
</ul>
</li>
<li><a class="dropdown" href="#">Menu 2</a>
<ul>
<li><a href="#">Sub-menu Item 1</a></li>
<li><a href="#">Sub-menu Item 2</a></li>
<li><a href="#">Sub-menu Item 3</a></li>
</ul>
</li>
<li><font size="+4", color="white">IBAE</font> <br></li>
<li><a href="#">Menu 3</a>
<ul>
<li><a href="#">Sub-menu Item 1</a></li>
<li><a href="#">Sub-menu Item 2</a></li>
<li><a href="#">Sub-menu Item 3</a></li>
</ul>
</li>
<li><a href="#">Menu 4</a>
<ul>
<li><a href="#">Sub-menu Item 1</a></li>
<li><a href="#">Sub-menu Item 2</a></li>
<li><a href="#">Sub-menu Item 3</a></li>
</ul>
</li>
</ul>
</h1>
</nav>
<br>
<br>
<br>
<br>

<div class="container">
<!--row one column one-->
<div class="row">
<div class="col-sm-3"><div class="cardpop">
<div class="card img-fluid" style="width:600px">
<img class="card-img-top" src="/Users/jeevabharathi/Desktop/test.jpg" alt="Card image" style="width:100%">
<div class="card-img-overlay">
<font color="white">
<h4 class="card-title">John Doe</h4>
<p class="card-text">Some example text some example text. Some example text some example text. Some example text some example text. Some example text some example text.</p>
<a href="#" class="btn btn-primary">See Profile</a>
</font>
</div>
</div></div>
</div>
<!--row one column two-->
<div class="col-sm-3"><div class="cardpop">
<div class="card img-fluid" style="width:600px">
<img class="card-img-top" src="/Users/jeevabharathi/Desktop/test.jpg" alt="Card image" style="width:100%">
<div class="card-img-overlay">
<font color="white">
<h4 class="card-title">John Doe</h4>
<p class="card-text">Some example text some example text. Some example text some example text. Some example text some example text. Some example text some example text.</p>
<a href="#" class="btn btn-primary">See Profile</a>
</font>
</div>
</div></div>

</div>
<!--row one column three-->
<div class="col-sm-3"><div class="cardpop">
<div class="card img-fluid" style="width:600px">
<img class="card-img-top" src="/Users/jeevabharathi/Desktop/test.jpg" alt="Card image" style="width:100%">
<div class="card-img-overlay">
<font color="white">
<h4 class="card-title">John Doe</h4>
<p class="card-text">Some example text some example text. Some example text some example text. Some example text some example text. Some example text some example text.</p>
<a href="#" class="btn btn-primary">See Profile</a>
</font>
</div>
</div></div>

</div>
<!--row one column four-->
<div class="col-sm-3"><div class="cardpop">
<div class="card img-fluid" style="width:600px">
<img class="card-img-top" src="/Users/jeevabharathi/Desktop/test.jpg" alt="Card image" style="width:100%">
<div class="card-img-overlay">
<font color="white">
<h4 class="card-title">John Doe</h4>
<p class="card-text">Some example text some example text. Some example text some example text. Some example text some example text. Some example text some example text.</p>
<a href="#" class="btn btn-primary">See Profile</a>
</font>
</div>
</div></div>

</div>
</div><br>
</div>


<!--test-->









<script src="https://code.jquery.com/jquery-3.3.1.js" integrity="sha256-2Kok7MbOyxpgUVvAk/HJ2jigOSYS2auK4Pfzbm7uH60=" crossorigin="anonymous"></script>
<script src="https://stackpath.bootstrapcdn.com/bootstrap/4.1.1/js/bootstrap.min.js"></script>
</body>
</html5>

这些是我的 html 和 CSS

nav h1 
{
vertical-align: middle;
background-color: rgb(0, 0, 0);
border: 10px solid rgba(0, 0, 0, 0);
text-align: center;
position: fixed;
position: top;
min-width: 100%;
z-index: 3;

}
.nav ul
{
vertical-align: middle;
-webkit-font-smoothing:antialiased;
text-shadow:0 1px 0 rgba(255, 255, 255, 0);
background: rgb(0, 0, 0);
list-style: none;
margin: 0;
padding: 0;
width: 100%;
z-index: 3;
}
.nav li
{
vertical-align: middle;
float: left;
margin: 0;
padding: 100;
position: relative;
min-width: 20%;
z-index: 3;
}
.nav a
{
vertical-align: middle;
background: rgb(0, 0, 0);
display: block;
font: bold 15px/50px helvetica;
padding: 0 0 0 0px;
text-align: center;
text-decoration: none !important;
color: rgb(255, 255, 255);
-webkit-transition: all .25s ease;
-moz-transition: all .25s ease;
-ms-transition: all .25s ease;
-o-transition: all .25s ease;
transition: all .25s ease;
z-index: 3;
}
.nav .dropdown:after
{
content: '';
}
.nav .dropdown:hover:after
{
content:''
}
.nav li:hover a
{
color: white;
background: rgb(0, 0, 0);
}
.nav li ul
{
vertical-align: middle;
float: left;
left: 0;
opacity: 0;
position: absolute;
top: 35px;
visibility: hidden;
z-index: 4;
-webkit-transition: all .25s ease;
-moz-transition: all .25s ease;
-ms-transition: all .25s ease;
-o-transition: all .25s ease;
transition: all .25s ease;
}
.nav li:hover ul
{
opacity: 1;
top: 50px;
visibility: visible;
}
.nav li ul li
{
float: none;
width: 100%;
}
.nav li ul a:hover
{
background: rgb(255, 0, 0);
}

body{
background: linear-gradient(to right, rgb(39, 38, 38), rgb(177, 72, 72),rgb(39, 38, 38))
}
.cardpop {
transition: all 0.5s;
}

.cardpop:hover {
transform: scale(1.1);
box-shadow: rgb(37, 37, 37);
transition: all 0.5s;
}

.cardpop:hover:before {
opacity: 1;
}

.cardpop:before {
content: "";
position: absolute;
top: 0;
right: 0;
bottom: 0;
left: 0;
box-shadow: 0 30px 30px rgba(0, 0, 0, 0.5);
transition: .15s all ease-out;
opacity: 0;
border-radius: 5px;
}

我成功地实现了我脑海中的一个小概念,但是引导卡上我使用的每个图像都有一个白色边框。我无法使用边框更改它。

Why does this happen? How do I solve it? I tried !important on border, it didn't change. Can I simply solve it using CSS? I don't want to use JS for now.

代码的 JDfiddle 链接:https://jsfiddle.net/pndmn1ev/

最佳答案

Bootstrap 4 包含一些边框实用程序类 - 您可以找到它们 here在 boostrap 文档中。

例如,您感兴趣的是 border-0

<div class="card border-0">...</div>

Boostrap 卡片在某些内部元素(标题、正文等)上有边框。确保将类添加到正确的元素

关于css - 如何去除引导卡中的白色边框?更改边框颜色不起作用,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/50306573/

24 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com