简单的CSS图片自适应

| |
[晴 2008/03/11 15:33 | by Doctor ]
适应宽度为600像素,所有图片大于600px就按比例缩小为600px,小于则不适应。

img{
  max-width:600px;
  width:expression(width>600?"600px":width);
}

expression 不是符合WEB标准的做法,不到万不得以不建议使用。但是不能不承认IE的很多扩展是不错的,IE不应该被轻视!
Tags: , , ,
PHP&DB&... | 评论(0) | 引用(0) | 阅读(426)
发表评论
表情
emotemotemotemotemot
emotemotemotemotemot
emotemotemotemotemot
emotemotemotemotemot
emotemotemotemotemot
打开HTML
打开UBB
打开表情
隐藏
昵称   密码   游客无需密码
网址   电邮   [注册]