的背景圖像使用joomla組件從數據庫中爲幻燈片顯示拉取圖像。調整div
它將圖像設置爲div的背景 - 我需要將該圖像的大小調整爲幻燈片的寬度(620px)。
<div style="background: url({image1url}) top center no-repeat;
width:620px;
height:350px">
<div style="width:620px;
height:256px;">
<a href="{url}">
<img src="modules/mod_jxtc_ezrealtywall/images/10x10spacer.gif" width="620" height="246" alt="10x10spacer.gif" /></a>
</div>
<div style="position:relative; width:620px;
height:104px;">
<div style="position:absolute; width:620px; height:95px; background:#000; opacity:0.7; filter:alpha(opacity=70); "></div>
<div style="position:absolute;">
<div style="float:left;
width:250px;
border-right: 1px dotted #cccccc;
color:#ebebeb;
padding-right:30px;
padding-left:20px;
text-align:right;
font-size:28px;
letter-spacing:-1px;
line-height:28px !important;
margin-top:16px;
font-weight:500;">
{unitnum} {streetnum} {address} {locality} {postcode}
</div>
<div style="float:right;
width:250px;
color:#ebebeb;
margin:23px 40px 5px 0px;
padding-left:15px;
text-align:left;
font-size:11px;
line-height:11px !important;">
{description}
</div>
</div>
</div>
那麼你的問題是什麼? – Martin 2010-07-21 09:00:46
這應該設置您的圖像大小 – Martin 2010-07-21 11:12:45
寬度x高度不適用於CSS bg圖像,Martin。 – NPC 2010-07-29 14:59:41