In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-04-06 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Development >
Share
Shulou(Shulou.com)06/03 Report--
This article is about how to use CSS to turn a web page into black and white. The editor thinks it is very practical, so share it with you as a reference and follow the editor to have a look.
Many people want to make their website black and white to express their condolences. There are other special reasons (such as the Wenchuan earthquake) to mourn some of the events, so the whole site needs to be set to gray or black-and-white squares. So let's talk about it today, through a few simple lines of code to achieve this function. The following I will attach to open the site-wide black and white tutorials and code it, only need a CSS definition, to turn the entire site into a gray tone, you do not have to go to a change the tone of the picture, just need to add the following definition on the HTML node of the css file.
The first way to turn a web page black and white:
Html {- webkit-filter:grayscale;}
If your site does not reference the css file, you can reference the following html code directly
Html {- webkit-filter:grayscale;}
The above CSS code may only support mainstream browsers. If you need to support QQ Browser, 360browser, IE browser and other browsers, you need to use the following paragraph:
Html {
-webkit-filter:grayscale (100%)
-moz-filter:grayscale (100%)
-ms-filter:grayscale (100%)
-o-filter:grayscale (100%)
Filter:progid:DXImageTransform.Microsoft.BasicImage (grayscale=1)
_ filter:none
}
The second way to turn the web page black and white:
The following code can change the page to black and white. Add the code to the top of CSS to achieve plain installation. If the website does not use CSS, you can insert it between the HTML code of the page / template and:
Html {filter:progid:DXImageTransform.Microsoft.BasicImage (grayscale=1);-webkit-filter:grayscale;}
Some webmasters may not be able to use this css on the site because the site does not use the latest web standard protocol.
Thank you for reading! This is the end of this article on "how to use CSS to turn a web page into black and white". I hope the above content can be of some help to you, so that you can learn more knowledge. if you think the article is good, you can share it for more people to see!
Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.
Views: 0
*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.
Continue with the installation of the previous hadoop.First, install zookooper1. Decompress zookoope
"Every 5-10 years, there's a rare product, a really special, very unusual product that's the most un
© 2024 shulou.com SLNews company. All rights reserved.