背景:线性渐变在iPad上呈现灰色边框

时间:2019-09-11 13:50:35

标签: html css linear-gradients

我有以下标记:

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来纠正此问题,但无济于事。

如何删除此内容?为什么会出现这种行为?

0 个答案:

没有答案