您的位置:首页 > Web前端 > CSS

利用CSS按比例缩小图片

2007-07-16 22:55 316 查看
把一副大图片按比例缩小到某个尺寸,对于现代浏览器,直接使用max-width和max-height两条CSS属性即可。阅读全文...

对于IE 6.0及以下版本,以上两条CSS属性均不会被理会。之前处理这种事情,我们往往会借助Javascript,然后为图片加上onload事件。例如:

<script type="text/javascript"><!--
google_ad_client = "pub-7655768891627260";
google_ad_width = 728;
google_ad_height = 90;
google_ad_format = "728x90_as";
google_ad_type = "text_image";
//2007-07-16: 酷哥广告渠道
google_ad_channel = "5559849160";
google_ui_features = "rc:0";
//-->
</script>
<script type="text/javascript"
src="http://pagead2.googlesyndication.com/pagead/show_ads.js">
</script>
内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
标签: