代码如下 | 复制代码 |
<!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=gb2312" /> <title>css 图片自动缩放</title> <style type="text/css"> .imgsize { width:expression(this.width>78?"78px":this.width+"px"); height:expression(this.height>78?"78px":this.width+"px"); } /* */ width:expression(this.width > 250 ? 250 : true); </head> <body> </body> |
时间: 2024-10-29 11:28:02