div+css 如何改变背景图片大小

来源:百度知道 编辑:UC知道 时间:2024/05/26 16:12:28
<div style="background:url(pic1.jpg);width:100px;height:80px;overflow:hidden;">
<img width="100" height="80" src="pic2.gif" alt="位于背景图片之上,圆角边框" />
</div>
其中:
pic1.jpg 200px*200px
pic2.gif 100px*80px 中间大概有90px*70px带圆角 为无像素
Html声明:
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">

解决问题后要求初步达到效果:
看上去背景图片整宽显示带圆角 可以比例改变或者不改变
怎么写div+css由您搞定
可以使用js 如果不用js给您加分
这个效果我要运用到http://www.ydbc.com.cn/thematic/nogestation.ht

<table width="100" height="100" border="0" align="center" cellpadding="0" cellspacing="0">
<tbody>
<tr>
<td valign="top" width="4" height="4"><img height="4"
src="img/xiao/new_line_004.gif" width="4" /></td>
<td background="img/xiao/new_line_008.gif" height="4"></td>
<td valign="top" width="4" height="4"><img height="4"
src="img/xiao/new_line_005.gif" width="4" /></td>
</tr>
<tr>
<td width="1" background="img/xiao/new_line_009.gif"></td>
<td
align="middle" valign="top"
style="PADDING-RIGHT: 0px; P