添加到桌面

CSS设置宽高后图片变模糊的解决办法

首页 技术教程 正文

2023-08-06T14:00:26.png
写博客的时候偶尔发现,明明图片清晰度足够,但是通过CSS设置宽度和高度后图片就变模糊了,使用如下CSS设置可解决这个问题。

image-rendering: -moz-crisp-edges; /* Firefox */     
image-rendering: -o-crisp-edges; /* Opera */      
image-rendering: -webkit-optimize-contrast; /*Webkit (non-standard naming) */
image-rendering: crisp-edges; 
-ms-interpolation-mode: nearest-neighbor; /* IE (non-standard property) */
}
img {    
image-rendering: -moz-crisp-edges; /* Firefox */     
image-rendering: -o-crisp-edges; /* Opera */      
image-rendering: -webkit-optimize-contrast; /*Webkit (non-standard naming) */
image-rendering: crisp-edges; 
-ms-interpolation-mode: nearest-neighbor; /* IE (non-standard property) */
}

本文来自投稿,不代表本站立场,如若转载,请注明出处:
-- 展开阅读全文 --
访问域名带www和不带对于SEO那个好
« 上一篇 07-19
小狐狸ChatGPT系统 AI身份角色模拟前置指令设置方法 参照模板
下一篇 » 07-31

发表评论

发表评论