Friday, October 11, 2013

In this article, We will teach you to write CSS Class that will use for convert natural color to black color and white color

Step 1: Write code HTML 
<html>
<head>
<title>CSS3 Filter</title>
<style type="text/css" rel="stylesheet">
//css code here
</style>
</head>
<body>
<img src="http://learning.itkonkhmer.com/ImageName.jpg" class="grayscale" />
</body>
</html>


Step 2: Write code HTML To convert picture to write color and black color we will use Filter 3 number are Standard CSS Filter for Webkit Browsers, Svg Filter for Firefox and Microsoft Filter Property for IE 6+
img.grayscale {

/* for Webkit browsere, Chrome 19+, Safari 6+ ... */
-webkit-filter: grayscale(1);

/* this is for Firefox 3.5+, Firefox mobile */
filter: url("data:image/svg+xml;utf8,#gs");

/* for IE6+ */
filter: gray;
}

0 comments:

Post a Comment