html - 在 html 和 css 中,边框底部和右侧保持黑色

标签 html css

我创建了按钮并希望边框为绿色。由于某种原因 - 只有左边框和上边框会改变颜色。我试图添加明确的 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/

相关文章:

css - 用 h3 样式覆盖链接 CSS

javascript - Chrome execCommand 'insertHTML' 在插入符号位于节点内部时在节点外部插入跨度

java - 在 JTextArea 的字符串中设置多种文本颜色

html - 图像未覆盖整个 "div"区域

html - 最佳 SRI 哈希大小是多少?

html - 如何使子 div 与滚动父级的高度相匹配?

html - 移动 chrome 中的窗口高度 100%

javascript - 如何在单击 meteor 中动态生成的每个 block 时显示表单?

css - p :selectbooleancheckbox is moving when slected in a p:dataTable

css - 在不该使用的时候使用表格