Apply three CSS filters side by side on an image - HTML CSS CSS Widget

HTML CSS examples for CSS Widget:Image

Description

Apply three CSS filters side by side on an image

Demo Code

ResultView the demo in separate window

<html>
 <head> 
  <meta name="viewport" content="width=device-width, initial-scale=1"> 
  <style id="compiled-css" type="text/css">
body {<!-- w w  w . j a  va2  s .c  om-->
   position:absolute;
   top:0;
   bottom:0;
   left:0;
   right:0;
   background:url('http://www.java2s.com/style/demo/Google-Chrome.png') no-repeat center center fixed;
   -webkit-filter:contrast(2);
   filter:contrast(2);
}

body:before {
   right:0;
   top:0;
   content:"";
   position:fixed;
   height:100%;
   width:34%;
   background:url('http://www.java2s.com/style/demo/Google-Chrome.png') no-repeat right center fixed;
   -webkit-filter:sepia(2);
   filter:sepia(2);
}

body:after {
   left:0;
   top:0;
   content:"";
   position:fixed;
   height:100%;
   width:34%;
   background:url('http://www.java2s.com/style/demo/Google-Chrome.png') no-repeat left center fixed;
   -webkit-filter:grayscale(2);
   filter:grayscale(2);
}
</style> 
 </head> 
 <body>  
 </body>
</html>

Related Tutorials