在IE11中,SVG伪背景图像不是全角

时间:2017-09-01 08:25:35

标签: html css svg

我在使用::after pseduo-element的元素上有背景图像但由于某种原因,在IE11中,背景图像不显示全宽,尽管事实上我有这些CSS设置:

.page--home__quaternary .form-holder--layout-band-name::after {
  content: '';
  top: 0;
  right: 0;
  bottom: 0;
  left: 0;
  height: 100%;
  width: 100%;
  display: block;
  background-image: url(../images/new/image.svg);
  position: absolute;
  background-repeat: no-repeat;
  background-size: cover;
  z-index: -1;
  background-color: #742d7b;
  -webkit-border-radius: 1.125em;
  border-radius: 1.125em;
  opacity: .75;
}

出于某种原因,高度很好但是它没有走向元素的全宽

1 个答案:

答案 0 :(得分:0)

@Simeon Rowsell在这个问题上回答了这个问题:

Background-size with SVG squished in IE9-10