Image 调整div的背景图像大小
使用joomla组件从数据库中提取图像进行幻灯片放映Image 调整div的背景图像大小,image,html,joomla,resize,background,Image,Html,Joomla,Resize,Background,使用joomla组件从数据库中提取图像进行幻灯片放映 <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/im
<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>
它将图像设置为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>
{unitnum}{streetnum}{address}{locality}{postcode}
{说明}
您不能使用CSS调整背景图像的大小(除非您使用的是未完全实现的CSS 3) 不能使用CSS调整背景图像的大小(除非您使用的是未完全实现的CSS 3) Jeepstone是对的,CSS 3支持它,除IE(joy)外,大多数浏览器都支持它,但我不确定IE9是否支持它?请参阅以获取更多信息,下面是一个示例-在这种情况下,通过将背景图像居中,我可以得到一个调整大小的背景图像,IE用户可以得到一个裁剪过的图像,这有时已经足够好了。。。也许
.backgroundImage {
-o-background-size: 100% 100%;
-webkit-background-size: 100% 100%;
-khtml-background-size : 100% 100%;
-moz-background-size: 100% 100%;
background-position: center center;
}
Jeepstone是对的,CSS3支持它,除IE(joy)外,大多数浏览器都支持它,但我不确定IE9是否支持它?请参阅以获取更多信息,下面是一个示例-在这种情况下,通过将背景图像居中,我可以得到一个调整大小的背景图像,IE用户可以得到一个裁剪过的图像,这有时已经足够好了。。。也许
.backgroundImage {
-o-background-size: 100% 100%;
-webkit-background-size: 100% 100%;
-khtml-background-size : 100% 100%;
-moz-background-size: 100% 100%;
background-position: center center;
}
那么你的问题是什么呢?这应该设置你的图像大小宽度x高度对CSS bg图像不起作用,Martin。那么你的问题是什么呢?这应该设置你的图像大小宽度x高度对CSS bg图像不起作用,Martin。