forked from pauginer/invisible-gradient-technique
-
Notifications
You must be signed in to change notification settings - Fork 0
/
index.html
55 lines (42 loc) · 1.78 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
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="eng" lang="eng">
<head>
<meta http-equiv="content-type" content="text/html; charset=utf-8" />
<meta name="viewport" content="width=device-width, initial-scale=1">
<title>The invisible gradient technique demo: cross-browser SVG support with fallback</title>
<style type="text/css">
.picture{
background: transparent url(puzzle-fallback.png) center center no-repeat;
background-image: -webkit-linear-gradient(transparent, transparent), url(puzzle-vector.svg);
background-image: linear-gradient(transparent, transparent), url(puzzle-vector.svg);
background-size: contain;
height: 800px;
max-width: 100%;
}
#container{
margin: 50px 50px;
}
/* Media queries to adapt the image height to the screen width for different devices.*/
@media only screen and (max-width: 700px) {
.picture{
height: 550px;
}
}
@media only screen and (max-width: 500px) {
.picture{
height: 350px;
}
}
</style>
</head>
<body>
<div id="container">
<h1>The invisible gradient technique demo: Cross-browser SVG support with fallback</h1>
<p>The image below has been zoomed, if you have a modern browser you'll see <a href="puzzle-vector.svg"> a hi-definition SVG vector image</a>.
If you have an old browser, you'll see <a href="puzzle-fallback.png">a low definition PNG image</a>. The technique is explained at <a href="http://pauginer.tumblr.com/post/36614680636/invisible-gradient-technique">this blog entry</a>.</p>
<div class="picture"></div>
<p>More information and mixins for Less and Sass are <a href="https://github.com/pauginer/invisible-gradient-technique">available at GitHub</a>.</p>
</div>
</body>
</html>