我有这个div。
.a {
  background-image: url(url_image);
  height: 400px;
  background-position: bottom;
  background-attachment: scroll
}<div class="a">
  <div class="b">
    <div class="content1">
    </div>
    <div class="content2">
    </div>
    <div class="content3">
    </div>
  </div>
.a图像具有不规则的边框:

我需要将背景图像放到div .b中,并获得如下内容:

这个是可能的吗?
发布于 2017-05-08 23:10:45
您需要翻转这两个图像。背景图像需要放入.a,不规则的边框图像需要放入.b。把这看作是画一幅画,你从背景开始,然后添加前景。前景图像需要有一个透明的背景,这样您才能看到背景图像。(这将是上面不规则背景图像的蓝色部分)
.a {
  background-image: url(myImage);
  background-size: 100% 100%;
  height: 400px;
  background-position: bottom;
  background-attachment: scroll
}
.b{
    background-image: url(irregularBorder);
    background-size: 100% 100%;
    height: 400px;
    background-position: bottom;
    background-attachment: scroll;
}https://stackoverflow.com/questions/43849791
复制相似问题