Hairlines / Borders

优质
小牛编辑
135浏览
2023-12-01

Since 1.x release all hairlines (borders) reworked to :after and :before pseudo elements instead of usual CSS borders. This method allows to have true 0.5px (for iOS Retina) and 0.33px (for iPhone 6 Plus) hairlines

The rule is simple:

  • "bottom" and "right" hairlines are made using :after pseudo elements
  • "left" and "top" hairlines are made using :before pseudo elements

So, for example, if you want to change navbar's bottom hairline color, you need to change background-color of :after element:

.navbar:after {
  background-color: red;
}

To remove bottom hairline on navbar and top hairline on toolbar:

.navbar:after {
  display:none;
}
 
.toolbar:before {
  display:none;
}

"no-border" class

There is also helper "no-border" class that can be used to remove hairlines. Currently it is supported on Navbar, Toolbar, Card and its elements (card header, footer).

To remove hairline from navbar:

<div class="navbar no-border">
    ...
</div>          

最后更新:

类似资料

  • 问题内容: 我试图弄清楚如何在矩形周围实现进度条。假设我的div为500x300,边框为5px(黑色)。 我希望进度条从左上角开始,然后转到->右角->底部-右角->左下角->然后回到 问题答案: CSS: CSS可以使用多个线性渐变作为 背景并将其适当放置,从而达到此效果。方法如下: linear-gradient为元素的每个边框创建4个稀薄的背景。边框的粗细决定了background-size

  • 问题内容: 如何在不使用borders-width的情况下使用CSS给任何元素添加边框? 像在Photoshop中一样,我们可以给笔画-内部,中心和外部 我认为默认的CSS边框属性是中心,如photoshop中的中心,对吗? 我想在框内而不是外面给边框。并且不想在框宽中包含边框宽度。 问题答案: 这不会增加额外的宽度和高度。

  • To enable the custom borders feature, set the customBorders option. It could be set as true or initialized as an array with predefined setup. To initialize Handsontable with predefined custom borders,

  • 在本章中,您将学习如何使用Java编程将边框应用于段落。 应用边框 以下代码用于在文档中应用边框 - import java.io.File; import java.io.FileOutputStream; import org.apache.poi.xwpf.usermodel.Borders; import org.apache.poi.xwpf.usermodel.XWPFDocument

  • border属性允许您指定表示元素的框的边框应如何显示。 您可以更改边框的三个属性 - border-color指定border-color 。 border-style指定边框是实线,虚线,双线还是其他可能值之一。 border-width指定border-width 。 现在,我们将看到如何将这些属性与示例一起使用。 边框颜色属性 border-color属性允许您更改元素周围边框的颜色。 您

  • 问题描述 (Problem Description) 如何使用Java将边框应用于word文档中的文本。 解决方案 (Solution) 以下是使用Java将边框应用于word文档中的文本的程序。 import java.io.File; import java.io.FileOutputStream; import org.apache.poi.xwpf.usermodel.Borders; i

相关阅读