重叠的背景x重复负边距 [英] Background x-repeat negative margin for overlap
问题描述
实际上我的第一个问题在堆栈上:)
Actually my first question on stack:)
我要在重复的背景上获得负(正确)边距,因此重复的图像之间不会有间隙.
I'm trying to get a negative (right) margin on my repeating background, so there won't be a gap between the repeating images.
似乎没有CSS语法.
为了清楚起见,我在下面添加了一张图片.因此,我正在尝试使类似Cookie的事物的重复图像重叠,以使它们之间没有间隙.
To make things clear, i added an image below. So i'm trying to get the repeating images of the cookie-like things to overlap so there's no gap between them.
推荐答案
您可以对一个元素应用多个背景,所以为什么不两次使用具有不同水平偏移量的背景图像.
You can apply multiple backgrounds to an element, so why not use this background image twice, with different horizontal offsets.
body {
min-height:170px;
background:
url('http://i.stack.imgur.com/jKAKB.png') 0 100% repeat-x,
url('http://i.stack.imgur.com/jKAKB.png') 75px 100% repeat-x;
}
PS之类的cookie称为kruidnoten.尽管每个人都打电话给pepernoten,但这实际上不是真的.
PS the cookie like things are called kruidnoten. Although everybody calls then pepernoten, which is not actually true.
这篇关于重叠的背景x重复负边距的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!