{"id":1031,"date":"2023-03-12T09:42:08","date_gmt":"2023-03-12T01:42:08","guid":{"rendered":"https:\/\/www.appblog.cn\/?p=1031"},"modified":"2023-04-29T13:12:26","modified_gmt":"2023-04-29T05:12:26","slug":"css3-grayscale-filter-image-turns-black-and-white","status":"publish","type":"post","link":"https:\/\/www.appblog.cn\/index.php\/2023\/03\/12\/css3-grayscale-filter-image-turns-black-and-white\/","title":{"rendered":"CSS3 grayscale\u6ee4\u955c\u56fe\u7247\u53d8\u9ed1\u767d"},"content":{"rendered":"<p>CSS3 grayscale\u6ee4\u955c\u56fe\u7247\u53d8\u9ed1\u767d\u5b9e\u4f8b<\/p>\n<h3>CSS\u4ee3\u7801<\/h3>\n<p><!-- more --><\/p>\n<pre><code class=\"language-css\">.gray { \n    -webkit-filter: grayscale(100%);\n    -moz-filter: grayscale(100%);\n    -ms-filter: grayscale(100%);\n    -o-filter: grayscale(100%);\n    filter: grayscale(100%);\n    filter: gray;\n    opacity: 1\n}<\/code><\/pre>\n<h3>HTML\u4ee3\u7801<\/h3>\n<pre><code class=\"language-html\">&lt;img src=&quot;http:\/\/image.zhangxinxu.com\/image\/study\/s\/s256\/mm1.jpg&quot; \/&gt;\n&lt;img src=&quot;http:\/\/image.zhangxinxu.com\/image\/study\/s\/s256\/mm1.jpg&quot; class=&quot;gray&quot; \/&gt;<\/code><\/pre>\n<p><img decoding=\"async\" src=\"http:\/\/image.zhangxinxu.com\/image\/study\/s\/s256\/mm1.jpg\" \/><br \/>\n<img decoding=\"async\" src=\"http:\/\/image.zhangxinxu.com\/image\/study\/s\/s256\/mm1.jpg\" style=\"-webkit-filter: grayscale(100%); -moz-filter: grayscale(100%); -ms-filter: grayscale(100%); -o-filter: grayscale(100%); filter: grayscale(100%); filter: gray; opacity: 1\" \/><\/p>\n","protected":false},"excerpt":{"rendered":"<p>CSS3 grayscale\u6ee4\u955c\u56fe\u7247\u53d8\u9ed1\u767d\u5b9e\u4f8b CSS\u4ee3\u7801 .gray { -webkit-filter: g [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[33],"tags":[85],"class_list":["post-1031","post","type-post","status-publish","format-standard","hentry","category-frontend-basic","tag-css"],"_links":{"self":[{"href":"https:\/\/www.appblog.cn\/index.php\/wp-json\/wp\/v2\/posts\/1031","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.appblog.cn\/index.php\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.appblog.cn\/index.php\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.appblog.cn\/index.php\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.appblog.cn\/index.php\/wp-json\/wp\/v2\/comments?post=1031"}],"version-history":[{"count":0,"href":"https:\/\/www.appblog.cn\/index.php\/wp-json\/wp\/v2\/posts\/1031\/revisions"}],"wp:attachment":[{"href":"https:\/\/www.appblog.cn\/index.php\/wp-json\/wp\/v2\/media?parent=1031"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.appblog.cn\/index.php\/wp-json\/wp\/v2\/categories?post=1031"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.appblog.cn\/index.php\/wp-json\/wp\/v2\/tags?post=1031"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}