我有一個固定並居中在頁面上的菜單有問題。無論用戶的屏幕尺寸如何,我都希望整個菜單(3個背景圖像)覆蓋整個頁面寬度。固定菜單,重複-x左邊,重複-x右邊
原單圖片 (圖片1:寬度1px的,高度76px;) (圖片2:寬度1135px,高度76px;) (圖片3:寬度1px的,高度76px;)
CSS更改後我希望這些成爲 (圖片1:寬度392,5px,高度76px;) (圖片2:寬度1135px,高度76px;) (圖片3:寬度392,5px,高度76px ;)
<div style="position:fixed; width:100%; height:76px;">
<div> Picture 1 </div> <-- repeat-x on the left side
<div> Picture 2 , center of the page , no-repeat</div>
<div> Picture 3</div> <-- repeat-x on the right side
</div>
我想在圖片1和3上設置repeat-x,但不知道寬度。我可以用jQuery修復它,但沒有一種方法在CSS中?
我建議你發佈你想要的結果的圖像,會有很多比較容易回答 – ptriek
你是什麼意思「CSS更改後」?你是否期待點擊,懸停等? –
沒有。我不想「重複-x」來填充網站的寬度。 – Plexus81