有人可以幫助為什么不能將邊框顏色從藍色(通過警報資訊)更改為 $f0f0f0 嗎?
<div
class="alert alert-info"
role="alert"
border="2px solid #f0f0f0
></div>
uj5u.com熱心網友回復:
你的代碼在這里不清楚,但我會盡量回答我能得到的。
<div class="alert alert-info" role="alert" style="border:2px solid #f0f0f0!important" ></div>
嘗試在style標簽中添加邊框屬性并添加!important到最后。
uj5u.com熱心網友回復:
可能是您繼承了檔案中的父 css
<link href="https://cdn.jsdelivr.net/npm/[email protected]/dist/css/bootstrap.min.css" rel="stylesheet"/>
<div class="alert alert-info" style="border:5px solid #f0f0f0;" role="alert">
This is a info alert—check it out!
</div>
uj5u.com熱心網友回復:
應用邊框顏色和邊框樣式屬性,這將允許設定邊框的顏色。我提供了一個示例 HTML 代碼供您參考,否則請添加
HTML代碼
<!DOCTYPE html>
<html>
<head>
<style>
h1 {
border-style: solid;
border-color: coral;
}
div {
border-style: solid;
border-color: coral;
}
</style>
</head>
<body>
<h1>hello</h1>
<div>World</div>
</body>
</html>
轉載請註明出處,本文鏈接:https://www.uj5u.com/shujuku/380543.html
上一篇:如何在bootstrap5中獲得一個簡單的3堆疊列布局為100vh
下一篇:中等大小時如何在中間制作div
