这是我的代码。我想将那个黄色圆圈向右移动(大约 25 像素)。我怎样才能只为第二张图片赋予该样式。
.img_home
{
background-repeat: no-repeat;
height: 1000px;
background-image: url(http://www.spidycode.com/testing/revibe/images/Circle1.png),url(http://www.spidycode.com/testing/revibe/images/Circle2.png);
}
<div class="img_home"></div>
最佳答案
试试这个
.img_home
{
background-repeat: no-repeat;
height: 1000px;
background: url(http://www.spidycode.com/testing/revibe/images/Circle1.png) 25px top no-repeat,url(http://www.spidycode.com/testing/revibe/images/Circle2.png) no-repeat;
}
<div class="img_home"></div>
关于html - 定位多个背景图像,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/44845418/