---
title: "css完美解决图片太大撑破表格 自适应图片按比例缩小"
author: "cometlj"
date: "2011-10-29T00:46:10Z"
tags: []
categories: ["Web前端"]
slug: "css"
draft: false
lastmod: "2011-10-29T00:46:10Z"
id: 1222386
url: "https://cometlj.iteye.com/blog/1222386"
---

```
<style type="text/css"> 
<!-- 
img,a img{ 
border:0;  
margin:0;  
padding:0; 
max-width:650px; 
width: expression(this.width > 650 && this.width > this.height ? 650px : 'auto';);  
max-height:1650px; 
height: expresion(this.height > 1650 ? 1650px : 'auto';); 
} --> 
</style>
```