61,112
社区成员
发帖
与我相关
我的任务
分享
<!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">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8"/>
<title></title>
<style type="text/css">
.comment_content {
margin:5px;
font-size:12px;
min-height:120px;
height:auto;
border:1px solid red;
}
.comment_content img {
width:expression(this.width > 800 ? "800px" : this.width)!important;
max-width:800px; /*IE8 BUG 过宽图片占位问题*/
border:1px solid blue;
}
.comment_footer {
margin:5px;
float:right;
}
</style>
</head>
<body>
<table>
<tr>
<td >
<div style="width:180px">
<input id="Checkbox1" name="ID" type="checkbox" runat="server" value='1' class="form_checkbox"/>
nickname<br />
2014/06/07 18:55
</div>
</td>
<td>
<div class="comment_content">
浏览器支持 <br />
<img src="http://b.zol-img.com.cn/desk/bizhi/image/5/2560x1600/1405474388902.jpg" />
</div>
<br /><br />
<div class="comment_footer">
<input type="radio" value="0" />显示 <input type="radio" value="1" />隐藏 <a href="###">设置</a>
</div>
</td>
</tr>
</table>
</body>
</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">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8"/>
<title></title>
<style type="text/css">
.comment_content {
margin:5px;
font-size:12px;
min-height:120px;
height:auto;
border:1px solid red;
}
.comment_content img {
border:1px solid blue;
}
.comment_footer {
margin:5px;
float:right;
}
</style>
<script>
window.onload=function(){
var div=document.getElementById('comment_content');
var img=new Image();
img.src='http://b.zol-img.com.cn/desk/bizhi/image/5/2560x1600/1405474388902.jpg';
img.onload=function()
{
if(this.width>800)
{
this.style.width='800px';
this.style.height=this.height/(this.width/800)+'px';
}
div.appendChild(img);
}
}
</script>
</head>
<body>
<table>
<tr>
<td >
<div style="width:180px">
<input id="Checkbox1" name="ID" type="checkbox" runat="server" value='1' class="form_checkbox"/>
nickname<br />
2014/06/07 18:55
</div>
</td>
<td>
<div class="comment_content" id="comment_content">
浏览器支持 <br />
</div>
<br /><br />
<div class="comment_footer">
<input type="radio" value="0" />显示 <input type="radio" value="1" />隐藏 <a href="###">设置</a>
</div>
</td>
</tr>
</table>
</body>
</html>
<script type="text/javascript" src="http://www.feiyit.net/js/jquery-1.7.2.min.js"></script>
<script type="text/javascript">
$(function(){
$(".imglist").each(function(){
var winW=$(this).width();
$(this).css({width:winW});
})
})
</script>
.comment_content img {
vertical-align: bottom;
}
在这个class中,添加上这个试试