2017-05-08 44 views

回答

0

這是你的身體標記內基本HTML:

<div id="navbar"> 
</div> 
<div id="textbox"> 
</div> 
<div id="lmodule"> 
</div> 
<div id="rmodule"> 
</div> 

這是你在你的專用CSS文件CSS。

#navbar { 
width: 100%; 
height: auto; (or if you have specific height put it) 
(position: fixed; - use this if you want your menu to stay with the viewer upon moving up/down the page) 
} 
#textbox { 
width: 60%; (based on your image I believe it is around 60%) 
height: auto; 
position: relative; 
margin: 0 auto; 
} 
#lmodule { 
display: inline-box; 
width: 27%; 
height: auto; 
float: left; 
margin: 0 3% 0 auto; 
} 
#rmodule { 
display: inline-box; 
width: 27%; 
height: auto; 
float: right; 
margin: 0 auto 0 3%; 
} 

這至少是我該怎麼做的。我使用基於%的值,因爲通過這種方式進行媒體查詢很容易。

+1

這是完美的!能夠從那裏模製它。謝謝! =] – AERO

+0

沒問題,只要它幫助你^ _ ^ –