帮我看看,我图片大小这样写不行啊,

来源:百度知道 编辑:UC知道 时间:2024/06/05 13:34:37
javascript:if(this.width>=this.height){if(this.width>190) this.style.width=190;}else{if(this.height>190) this.style.height=190;}
根据判断宽和高限制显示
但有的时候页面显示图片多了啊
缓存不过来,图片会全一下都显示出来,布局都乱了啊.

晚上看很多都是先出来一个表框,过一会在出来一张比例收缩的图片
现在求教下怎么写啊
我是用ASP写的

我把我的代码给你,研究一下吧。
这个能够满足大部分需要了。
-------------------------------------
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML>
<HEAD>
<TITLE> Document </TITLE>
<style type="text/css">
body{
padding : 0px ;
margin : 0px;
background-color : #999999 ;

}
.DivMain {
position : absolute ;
text-align : center ;
overflow : hidden ;
}
.DivMenu {
position : absolute ;
text-align : left ;
overflow : hidden ;
}
.ImgMain {
position : absolute ;
overflow : hidden ;
border : 0px ;
}
.TBMain {
background-color : #CCCCCC ;
padding : 0px ;
border : 0px ;
z-index : 99 ;
line-height : 18px ;

}
.TBMenu {
background-color : #FFCCCC ;
padding : 0px ;
border : 0px ;
z-index : 99 ;
color: #000000 ;