图片缩放
程序员文章站
2024-03-24 12:24:46
...
<html>
<head>
<meta http-equiv="Content-Type" content="text/html" />
<title>纯CSS实现图片等比缩放兼容IE6/IE7/火狐/谷歌_懒人建站</title>
<style type="text/css">
.suofang {MARGIN: auto;WIDTH: 100px;float:left;}
.suofang img{MAX-WIDTH: 100%!important;HEIGHT: auto!important;width:expression(this.width > 100 ? "100px" : this.width)!important;}
</style>
</head>
<body>
<div class="suofang">
<img src="123.jpg"/>
</div>
<img src="123.jpg"/>
</body>
</html>
下一篇: css3-animation