作者abhouse24 (ab)
看板Web_Design
標題Re: [問題] css背景顯示不出來
時間Wed Nov 19 23:28:57 2008
main是我設的一個div
以下是CSS
#main {
width: 507px;
float: right;
height: 300px;
margin-right: 0px;
margin-left: 0px;
padding-right: 10px;
padding-left: 10px;
background-attachment: fixed;
background-repeat: no-repeat;
background-position: center top;
background-image: url(image/main_bg.jpg);
}
工作版面上看得到圖 預覽的時候卻看不到
而且div並沒有隨著背景的大小被撐開 要自己動手設值
請高手解答一下
感恩~
※ 引述《abhouse24 (ab)》之銘言:
: 已爬文 但時仍然不是很懂
: 我設了一個div
: 在在此div的css設定"背景圖片"卻顯示不出來
: 如果是"背景顏色"可以正常顯示
: 爬文好像說是圖片路徑的問題(不確定)
: 有高人可以指點一下嗎
: 感謝感謝!!
--
Isn't it funny how you think you've got your whole life planned,
just to find how it was never really in your hands.
C'est la vie !
--
※ 發信站: 批踢踢實業坊(ptt.cc)
◆ From: 123.192.176.240
→ tn801534:請加"..." 11/19 23:38
→ kyork:margin padding background 都可以合成一列 11/20 13:56
→ kyork:這跟你的問題無關,但是可以精簡.css檔 11/20 13:56