我有以下标记:
body{
background: black;
}
.hero {
margin: 0;
padding: 100px 0px;
background: lightgrey;
position: relative;
}
.hero:before {
content: "";
position: absolute;
top: 0;
left: 0;
right: 0;
bottom: 0;
background: linear-gradient(190deg, transparent 50%, #fff 50%);
z-index: 1;
border: 0;
}
<div class="hero"></div>
在iPad上,before
伪指令的顶部会生成灰色边框。我尝试添加border: 0
来纠正此问题,但无济于事。
如何删除此内容?为什么会出现这种行为?