我在一个块中有一些彼此靠近的 div,我希望它们在屏幕变大(CTRL +)时保持在同一个块(行)中,这是我的代码(http://fiddle.jshell.net/YDyfy/) ,CSS:
#menu{
width:100%;
height:40px;
margin:auto;
padding:0 0 12;
background:url(file:///C:/Users/Windows7/Desktop/imgbg.jpg) repeat 0 0 #f8f8f8;
border:1 solid;
border-width:0 1 1;
box-shadow:0px 1px 10px #000;
text-align:center;
position:fixed;
top:0;
left:0;
right:0;
}
.menutext{
font-family:Helvetica neue,Helvetica,Arial,Verdana,Sans-serif;
font-size:16;
display:inline-block;
border:solid;
border-color:#aaa #ccc;
border-width:0 0 5 6;
padding:6 40 7 40;
margin:7 15;
box-shadow:-1px 2px 5px #404040;
}
HTML:
<div id="menu">
<a href="#div1" class="scroll"><div class="menutext" linkId="div1">Description</div></a>
<a href="#div2" class="scroll"><div class="menutext" linkId="div2">Shipping and payments</div></a>
<a href="#div3" class="scroll"><div class="menutext" linkId="div3">Seller information</div></a>
<a href="#div4" class="scroll"><div class="menutext" linkId="div4">Feedback</div></a>
</div>
简单地说,我希望当屏幕变大时 div 保持在同一行/块中