html – 当模糊效果悬停时,如何将图像更改为黑白图像

html – 当模糊效果悬停时,如何将图像更改为黑白图像,第1张

概述我想将其更改为黑白图像.谁能帮我? BLUR*/.blur img { -webkit-transition: all 1s ease; -moz-transition: all 1s ease; -o-transition: all 1s ease; -ms-transition: all 1s ease; transition: a 我想将其更改为黑白图像.谁能帮我?

BLUR*/.blur img {  -webkit-Transition: all 1s ease;     -moz-Transition: all 1s ease;       -o-Transition: all 1s ease;      -ms-Transition: all 1s ease;          Transition: all 1s ease;} .blur img:hover {  -webkit-filter: blur(5px);}
<div >  <img src="http://www.spyderonlines.com/images/wallpapers/pic-of-nature/pic-of-nature-3.jpg" ></div>
解决方法 添加:-webkit-filter:blur(5px)灰度(100%);

BLUR*/.blur img {  -webkit-Transition: all 1s ease;     -moz-Transition: all 1s ease;       -o-Transition: all 1s ease;      -ms-Transition: all 1s ease;          Transition: all 1s ease;} .blur img:hover {  -webkit-filter: blur(5px) grayscale(100%);}
<div >  <img src="http://www.spyderonlines.com/images/wallpapers/pic-of-nature/pic-of-nature-3.jpg" ></div>
总结

以上是内存溢出为你收集整理的html – 当模糊效果悬停时,如何将图像更改为黑白图像全部内容,希望文章能够帮你解决html – 当模糊效果悬停时,如何将图像更改为黑白图像所遇到的程序开发问题。

如果觉得内存溢出网站内容还不错,欢迎将内存溢出网站推荐给程序员好友。

欢迎分享,转载请注明来源:内存溢出

原文地址: http://outofmemory.cn/web/1045692.html

(0)
打赏 微信扫一扫 微信扫一扫 支付宝扫一扫 支付宝扫一扫
上一篇 2022-05-24
下一篇 2022-05-24

发表评论

登录后才能评论

评论列表(0条)

保存