gpt4 book ai didi

Chrome 61 的 CSS 问题

转载 作者:行者123 更新时间:2023-11-28 09:16:14 25 4
gpt4 key购买 nike

我在我的网站上使用自定义水平线 CSS 样式。它看起来像下面这样:

Styled HR in Firefox

但是因为我已经将我的谷歌浏览器更新到版本 61,符号的行高被忽略了,它看起来像这样:

HR in Chrome 61

我正在使用以下代码:

hr {
background: #ccc;
border: 0;
height: 1px;
line-height: 1 !important;
margin: 20px 0;
text-align: center;
clear: both;
}
hr:after {
content: '\f0c4';
display: inline-block;
position: relative;
top: -10px;
padding: 0 10px;
background: #fff;
color: #ccc;
font-family: 'FontAwesome';
font-size: 20px;
}

最佳答案

overflow <hr> 属性似乎有一个新的默认值元素。

看起来值从 visible 改变了至 hidden ,所以图标被隐藏了。您可以添加 overflow:visible<hr>元素再次显示您的图标。

hr {
background:#ccc;
border:0;
clear:both;
height:1px;
line-height:1 !important;
margin:20px 0;
overflow:visible;
text-align:center;
}
hr:after {
background:#fff;
color:#ccc;
content:'\f0c4';
display:inline-block;
font-family:'FontAwesome';
font-size:20px;
padding:0 10px;
position:relative;
top:-10px;
}
<link href="https://maxcdn.bootstrapcdn.com/font-awesome/4.7.0/css/font-awesome.min.css" rel="stylesheet"/>
<hr/>

Hint: I recommend you to use normalize.css to avoid such an issue.

关于Chrome 61 的 CSS 问题,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/46172173/

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