-
Notifications
You must be signed in to change notification settings - Fork 0
/
index.html
179 lines (149 loc) · 3.71 KB
/
index.html
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8">
<title>CSS Image Effects</title>
<link rel="stylesheet" href="css/style.css">
<link rel="stylesheet" href="css/cssgram.css">
</head>
<body id="home">
<h1>Mindblowing CSS Image Effects</h1>
<ul>
<li>
<h3>Original</h3>
<img src="img/backpack-lake.jpg">
</li>
<li>
<h3>Greyscale</h3>
<img class="grayscale" src="img/backpack-lake.jpg">
<pre>
.grayscale {
-webkit-filter: grayscale(1);
filter: grayscale(1);
}
</pre>
</li>
<li>
<h3>Blur</h3>
<img class="blur" src="img/backpack-lake.jpg">
<pre>
.blur {
-webkit-filter: blur(5px);
filter: blur(5px);
}
</pre>
</li>
<li>
<h3>Invert</h3>
<img class="invert" src="img/backpack-lake.jpg">
<pre>
.invert {
-webkit-filter: invert(.8);
filter: invert(.8);
}
</pre>
</li>
</ul>
<h2>CSS Blend Modes</h2>
<ul>
<li>
<h3>Screen Blend</h3>
<div class="filter-img">
<div class="circle multiply"></div>
<img src="img/backpack-lake.jpg">
</div>
</li>
<li>
<h3>Text Blend</h3>
<div class="filter-img">
<div class="hello">hello</div>
<img src="img/backpack-lake.jpg">
</div>
</li>
<li>
<h3>One Colour Blend</h3>
<div class="filter-img blendmode-01">
</div>
</li>
<li>
<h3>Gradient Colour Blend</h3>
<div class="filter-img blendmode-02">
</div>
</li>
</ul>
<h2>CSSgram Examples</h2>
<ul>
<li>
<h3>Toaster</h3>
<figure class="toaster">
<img src="img/backpack-lake.jpg">
</figure>
</li>
<li>
<h3>1977</h3>
<figure class="_1977">
<img src="img/backpack-lake.jpg">
</figure>
</li>
<li>
<h3>Walden</h3>
<figure class="walden">
<img src="img/backpack-lake.jpg">
</figure>
</li>
<li>
<h3>Nashville</h3>
<figure class="nashville">
<img src="img/backpack-lake.jpg">
</figure>
</li>
<li>Full list of available effects available <a href="http://una.im/CSSgram/">here</a>.</li>
</ul>
<h2>Backdrop Filters</h2>
<img class="backdrop-img" src="img/backdrop-blur.png">
<p>Checkout the blurring of the images behind the top navigation bar as you scroll down the page. Check browser support and more here: <a href="https://webkit.org/blog/3632/introducing-backdrop-filters/">https://webkit.org/blog/3632/introducing-backdrop-filters/</a>
<h2>Animating CSS Filters</h2>
<ul>
<li>
<h3>Animating greyscale on hover</h3>
<img class="grayscale" src="img/backpack-lake.jpg">
<pre>
.grayscale {
-webkit-filter: grayscale(1);
filter: grayscale(1);
transition: 2s;
animation-timing-function:ease-in-out;
}
.grayscale:hover {
-webkit-filter: grayscale(0);
filter: grayscale(0);
}
</pre>
</li>
<li>
<h3>Animate on click <button> Click to animate</button></h3>
<img class="original" src="img/backpack-lake.jpg">
<pre>
.animate-blur {
-webkit-animation: blur-animated 2s linear;
}
@-webkit-keyframes blur-animated {
0% {
-webkit-filter: blur(0);
}
100% {
-webkit-filter: blur(5px);
}
}
</pre>
</li>
</ul>
<p class="photo-credit">Photo by <a href="https://unsplash.com/photos/HkMyfOoSjkQ">Micki Spollen</a></p>
<script src="https://ajax.googleapis.com/ajax/libs/jquery/1.11.3/jquery.min.js"></script>
<script>
$('button').click(function() {
$('.original').toggleClass('animate-blur');
});
</script>
</body>
</html>