forked from slawekkolodziej/FitText.js
-
Notifications
You must be signed in to change notification settings - Fork 117
/
example.html
56 lines (50 loc) · 1.44 KB
/
example.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
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8" />
<title>FitText</title>
<style type="text/css">
body {
background: #233a40;
color: #fff;
font: 16px/1.8 sans-serif;
}
.container {
width: 84%;
margin:0 auto;
max-width:1140px;
}
header {
width: 100%;
margin:0px auto;
}
h1 {
background: rgba(0,0,0,0.2);
text-align: center;
color:#fff;
font: 95px/1 "Impact";
text-transform: uppercase;
display: inline-block;
text-shadow:#253e45 -1px 1px 0,
#253e45 -2px 2px 0,
#d45848 -3px 3px 0,
#d45848 -4px 4px 0;
width: 100%;
margin: 5% auto 5%;
}
</style>
<!--[if IE]><script src="http://html5shiv.googlecode.com/svn/trunk/html5.js"></script><![endif]-->
</head>
<body>
<div class="container">
<header>
<h1 id="fittext">Squeeze with FitText</h1>
</header>
<p>Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum.</p>
</div>
<script src="fittext.js"></script>
<script type="text/javascript">
fitText(document.getElementById('fittext'), 1.2)
</script>
</body>
</html>