Html 在背景中偏移图像的步骤
我对css非常了解。我需要一些帮助。 我有其他元素的div:Html 在背景中偏移图像的步骤,html,css,Html,Css,我对css非常了解。我需要一些帮助。 我有其他元素的div: <div class="place_section" style="height:375px;" data-session="3" data-client="2"> <div class="row">1</div> <div id="3" class="place place_type1" data-place="[l=1;f=0;r=1;p=1]"> &l
<div class="place_section" style="height:375px;" data-session="3" data-client="2">
<div class="row">1</div>
<div id="3" class="place place_type1" data-place="[l=1;f=0;r=1;p=1]">
<div class="center_chair">
<span class="left_chair"></span>
<span class="right_chair"></span>
</div>
</div>
// other divs
</div>
这是它的屏幕截图:
我想把图像的蓝线偏移到右边,大约20-25px。我该怎么做?
谢谢。如果我理解正确,我会在第1行之前添加一个div来表示屏幕:
<div class="place_section">
<div class="big_screen">
<div class="row"> ... </div>
<div class="row"/>... </div>
</div>
希望能有帮助。您想让4号线向右移动一点吗?不,主根div在顶部有背景蓝线,我想把它偏移到右侧。你的边距顶部应该是右边距,我猜是因为你使用边距:0 auto,这意味着从顶部开始0,那么为什么你要再次给边距顶部:40px?我注释了边距:0 auto并尝试使用边距左侧,但是所有div都移动了,但我只想要图像。如果我们能在JSFIDLE或其他地方看到您的代码,那就太好了。
<div class="place_section">
<div class="big_screen">
<div class="row"> ... </div>
<div class="row"/>... </div>
</div>
.big_screen {
background: url("/content/images/screen_bg.png") 0 0 repeat-x;
margin: ...;
}