以下为自适应高度的示例(在图片加载时不会把容器撑大)
<mce:script language="JavaScript" src="http://www.zzsky.cn/effect/images/jquery-1.4.2.min.js" mce_src="http://www.zzsky.cn/effect/images/jquery-1.4.2.min.js"></mce:script>
<mce:script language="javascript"><!--
$.each($("#fixImgCon img"),function(){//把“fixImgCon”修改为内容页显示内容的DIV的ID属性值
var image=new Image();
var fixH=98;//自适应高度
image.src=$(this).attr('src');
if(image.height>0 && image.height>0){
if(image.height>=fixH){
$(this).attr('height',fixH);
$(this).attr('width',(image.width*fixH)/image.height);
}
}
});
// --></mce:script>
修改内容请查看代码注释,代码需放在容器以后的位置
(补:img元素需设定宽高)
仍在寻求更好解决方法