gpt4 book ai didi

html - 如何更改
标签的粗细

转载 作者:IT老高 更新时间:2023-10-28 11:01:56 27 4
gpt4 key购买 nike

我想在 CSS 中更改我的水平线 (<hr>) 的粗细。我知道它可以像这样在 HTML 中完成 -

<hr size="10">

但我听说这是 deprecatedMDN here 中所述.在 CSS 中,我尝试使用 height:1px但它不会改变厚度。我想要 <hr>行是 0.5px厚的。

我在 Ubuntu 上使用 Firefox 3.6.11

最佳答案

为保持一致性,删除所有边框并使用 <hr> 的高度厚度。添加背景颜色将为您的 <hr> 设置样式指定高度和颜色。

在您的样式表中:

hr {
border: none;
height: 1px;
/* Set the hr color */
color: #333; /* old IE */
background-color: #333; /* Modern Browsers */
}

或者你有它的内联:

<hr style="height:1px;border:none;color:#333;background-color:#333;" />

更多解释here

关于html - 如何更改 <hr> 标签的粗细,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/4151743/

27 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com