我创建了按钮并希望边框为绿色。由于某种原因 - 只有左边框和上边框会改变颜色。我试图添加明确的 border-bottom-color 和 right-border-color 但它没有帮助...
.main-table
{
//width: 40%;
//margin-top: 2%;
margin-left: 20%;
border-thick: 10px;
border-color: green;
border-bottom-color: green;
}
.sub-button{
border-thick: 10px;
border-color: green;
border-bottom-color: green;
border-right-color: green;
height: 100px;
width: 100%;
font-family: calibary;
background-color: white;
}
th, tr, td {
text-align:center;
padding:5px;
border-thick: 10px;
border-color: green;
border-bottom-color: green;
}
<table class="main-table" >
<tr>
<td><button class="sub-button" type="button" id="reports" accessKey=0 align="middle" [routerLink]="['../../reports/historical-data']"><h4>Reports</h4><h6>Access and review daily and weekly statistics</h6></button></td>
<td><button class="sub-button" type="button" id="documents" accessKey=0 size="lg" align="middle" [routerLink]="['../../documentation/product-documentation']"><h4>Documentation</h4><h6>Download the latest product specification</h6></button></td>
</tr>
<tr>
<td><button class="sub-button" type="button" id="test" accessKey=0 size="lg" align="middle" [routerLink]="['../../test-diagnostics/live-query']"><h4>Test a Number</h4><h6>Discover a numbers attributes across all services</h6></button></td>
<td><button class="sub-button" type="button" id="ticket" accessKey=0 size="lg" align="middle" [routerLink]="['../../support/ticket']"><h4>Support</h4><h6>Open a ticket with the XConnect Technical team</h6></button></td>
</tr>
谢谢!
最佳答案
您必须使用 border-style:solid;
来获得实心边框。您得到的是浏览器为按钮显示其首选的 border-style
-- **outset**
(按钮右下边缘的较暗阴影)。请参阅:https://jsfiddle.net/9txgjLzk/
.sub-button{
border-style:solid;
border-width: 10px;
border-color: green;
}
使用border-width
而不是border-thick
关于html - 在 html 和 css 中,边框底部和右侧保持黑色,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/58785797/