最新下载
热门教程
- 1
- 2
- 3
- 4
- 5
- 6
- 7
- 8
- 9
- 10
css 按比例缩小或者放大代码
时间:2022-06-25 10:14:08 编辑:袖梨 来源:一聚教程网
如:
| 代码如下 | 复制代码 |
| img{max-width:100px;max-height:100px;} img{min-width:100px;min-height:100px;} |
|
对于IE6及其以下版本的浏览器,则可以利用其支持的expression属性,在css code中嵌入javascript code来实现图片的缩放,
如下:
| 代码如下 | 复制代码 |
| .thumbImage {max-width: 100px;max-height: 100px;} /* for Firefox & IE7 */ * html .thumbImage { /* for IE6 */ width: expression(this.width > 100 && this.width > this.height ? 100 : auto); height: expression(this.height > 100 ? 100 : auto); } |
|
相关文章
- ASP.NETCore应用程序配置文件AppSetting.json 09-16
- 如何在.net6webapi中使用自动依赖注入 09-16
- .Net加密神器Eazfuscator.NET 2023.2 最新版使用教程 09-16
- 如何在.Net6webapi中记录每次接口请求的日志 09-16
- .net中string类型可以作为lock的锁对象吗 09-16
- .NET6中使用GRPC的示例代码 09-16