定位div元素以匹配正文背景

时间:2015-05-16 09:49:45

标签: html css position

我有以下代码(屏幕截图:http://hi-tek.si/1.png):

<body style="margin:0px;
             padding:0px;
             background:url('bg_circles_top.png') no-repeat;
             background-position:-webkit-calc(50% - 34px) 0%;
             height:100%">
</body>

但是现在我想添加一个与身体背景相匹配的div元素。 div应该左对齐到第一个“空心圆”的开头,右边对齐到第二个“空心圆”的末尾(截图:http://hi-tek.si/2.png):

Background image with circles

问题是,我不知道该怎么做,因为当放大/缩小页面时,它都搞砸了。

0 个答案:

没有答案