各位好,想請教我要怎麼把邊邊的灰框消除?
我看網路上用border-collapse:collapse;但還是無法.....
以下是我的程式碼:
<meta name="viewport" content="width=device-width, initial-scale=1">
<link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/4.3.1/css/bootstrap.min.css">
<link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/4.3.1/css/bootstrap.min.css">
<script src="https://ajax.googleapis.com/ajax/libs/jquery/3.4.1/jquery.min.js"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/popper.js/1.14.7/umd/popper.min.js"></script>
<script src="https://maxcdn.bootstrapcdn.com/bootstrap/4.3.1/js/bootstrap.min.js"></script>
<link href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/5.9.0/css/all.css" rel="stylesheet">
<link href="https://cdnjs.cloudflare.com/ajax/libs/fancybox/3.5.2/jquery.fancybox.css" rel="stylesheet">
<script src="https://cdnjs.cloudflare.com/ajax/libs/fancybox/3.5.2/jquery.fancybox.js"></script>
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/animate.css/3.7.2/animate.min.css">
<div class="container" >
<br><br>
<table class='table table-bordered text-center max ' style="border-collapse:collapse; ">
<tr class='' bgcolor='#999961' style="border-spacing:0; collapse;border:1px solid white;">
<th class='text-center align-middle' style="border-radius:10% 0% 0% 0%;"> 客戶</th>
<th class='text-center align-middle' >數量</th>
<th class='text-center align-middle' style="border-radius:0% 10% 0% 0%; "> 聯絡人<br>電話</th>
</tr>
</tbody>
</table>
</form>
</div>
謝謝大家
table {
border-collapse: separate;
border-spacing: 0;
width: 100%;
}
/* 左上角 border-radius */
table tr:first-child th:first-child {
border-top-left-radius: 10px;
}
/* 右上角 border-radius */
table tr:first-child th:last-child {
border-top-right-radius: 10px;
}
/* 左下角 border-radius */
table tr:last-child td:first-child {
border-bottom-left-radius: 10px;
}
/* 右下角 border-radius */
table tr:last-child td:last-child {
border-bottom-right-radius: 10px;
}
大大好:這方法是可行的,可是只要我加上這行就會破功,他的灰色的邊邊又會出現....
<link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/4.3.1/css/bootstrap.min.css">
把你自定的style css加在bootstrap.min.css的下方~
這是我的網頁用的
<link href="/scripts/bootstrap-5.0.0-beta3-dist/css/bootstrap.min.css" rel="stylesheet">
<script src="/scripts/jquery-3.6.0.min.js"></script>
<script src="/scripts/main.js"></script>
<link href="/scripts/common.css" rel="stylesheet">
或是你把圓角table用自定的class取代table tag
看起來應該是table-bordered
這個class
拿掉自己重新刻左右邊
都用bootstrap了就別再用table排版了吧@@
th 跟 td 也要改,否則會破角
噗,不過有些狀況table會比row cell好搞定,就像我們這個有意見的主管,就是要看到有表格線的電子名片...反覆思索,也只有找到這個索路詢,掃名片上的QRCODE也只有用手機,所以一半table一半bootstrap...