我有这个代码
<hr style="margin-top: 5px; color: #ada95b; width: 500px;"/>
然而,这只适用于 Firefox,不适用于我的 Chrome 和 IE 版本。哪种方式最适合设置它们的样式并且它们适用于所有浏览器?
最佳答案
最好的方法是移除边框并为背景添加颜色......即
<hr style="margin-top: 5px; height: 2px; border: none; background: #ada95b; width: 500px;"/>
关于html - HR Styling - 仅适用于 Firefox,如何使其适用于 IE 和 Chrome,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/5619566/