css - 全高左右边框,无底边框

标签 css

我希望在我的元素中有全高的左右边框,但我希望底部边框是透明的。

我目前使用的是:

.graph {
  border: 1px solid #ddd;
  border-bottom-color: transparent; 
}

但这样做的结果是左右边框缺少底部像素:

enter image description here

理想情况下,我希望我的 graph 标签元素具有全高边框,这样我就不会在底部丢失丑陋的半像素。

有什么我可以做的吗?

最佳答案

尝试使用 border-bottom-width: 0; 完全移除底部边框。

关于css - 全高左右边框,无底边框,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/39531339/

相关文章:

css - Chrome : transform scale and blurred edges

html - css编码风格——选择器嵌套

CSS 定位 - 将 div 调整为其他 div

html - CSS 规则不适用于 HTML 元素

html - css:当 div B 悬停时更改了 div A 的背景颜色

css - Bootstrap 4 导航栏 : how to right-align an icon and keep it out of the toggle?

gradient - CSS3 渐变使像素在 border-radius 中不着色

html - 带标题的居中图形

javascript - 如何将 JS 动画限制在你点击进入的输入字段,而不是全部?

html - 在分词前添加连字符