Codrops Playground

#cssref filter (2) by SaraSoueidan

HTML

7
 
1
<div class="container">
2
  <p>
3
    The image on the right has more contrast, has then been brightened, and then supersaturated. 
4
  </p>
5
  <img src="http://tympanus.net/codrops-playground/assets/images/cssref/properties/filter/city.jpg" alt="city" class="original" />
6
  <img src="http://tympanus.net/codrops-playground/assets/images/cssref/properties/filter/city.jpg" alt="city" class="filtered" />
7
</div>

CSS

28
 
1
body {
2
  background-color: #F5F5F5;
3
  color: #555;
4
  font-size: 1em;
5
  font-family: 'Helvetica Neue', Helvetica, Arial, sans-serif;
6
}
7
8
.container {
9
  margin: 40px auto;
10
  max-width: 900px;
11
}
12
13
p {
14
  padding: 20px;
15
  background-color: #111;
16
  color: white;
17
}
18
19
code {
20
  font-size: 1.2em;
21
}
22
23
.filtered {
24
  -webkit-transition: 1s;
25
  transition: 1s;
26
  -webkit-filter: contrast(150%) brightness(150%) saturate(150%);
27
}
28

JS

1
 
1

#cssref filter (2)

by SaraSoueidan on

Demo for the Codrops CSS Reference entry filter

Codrops Logo Codrops Playground

Version 0.0.9 (alpha)

Codrops Playground is currently in development with many features to come, including mobile support. We are in alpha stage right now, so if you find a bug, please send a mail to playground@codrops.com or use the contact form on Codrops.

If you'd like to stay updated, follow us on Twitter @codrops. Thank you and stay tuned :)