gpt4 book ai didi

html - 为 Internet Explorer 设计 hr

转载 作者:技术小花猫 更新时间:2023-10-29 12:44:37 25 4
gpt4 key购买 nike

嘿,在我尽可能创建图像光站点的过程中,我希望创建两个色调小时。

我已经在现代浏览器中实现了这一点,但想在 ie6 和 7 中实现同样的效果。

我目前使用的代码是

hr {
border-bottom:1px solid #FFFFFF;
border-top:1px solid #dcdcdc;
clear:both;
height:0;
border-left:0px;
border-right:0px;
}

我已经尝试过,但没有成功地在 ie6 和 7 中运行,而无需专门针对浏览器。有什么想法吗?

(这是我当前的元素,我正在使用这段代码,并希望让它跨浏览器 - http://www.qwibbledesigns.co.uk/preview/aurelius/)

干杯

马特

最佳答案

我还没有看到任何好的答案,但尽管我自己的工作发现以下代码应该可以使 HR 的样式在 firefox、safari、chrome 和 IE 中看起来一致(不确定它是否在 IE7 以下工作)。

hr {
color:#bfbfbf; /*used for IE, top color*/
background:#bfbfbf; /*firefox and chrome, top color*/
min-height: 0px; /*required to get IE to render the top pixel color*/
border-left: 0px;
border-right: 0px;
border-top: 1px solid #bfbfbf; /*Your top color*/
border-bottom: 1px solid #ffffff; /*Your bottom color*/
}

关于html - 为 Internet Explorer 设计 hr,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/2017227/

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