|
3 | 3 | <html>
|
4 | 4 |
|
5 | 5 | <head>
|
6 |
| - <meta charset="utf-8"> |
7 |
| - <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1"> |
8 |
| - <meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0"> |
| 6 | + <meta charset="utf-8"> |
| 7 | + <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1"> |
| 8 | + <meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0"> |
9 | 9 |
|
10 |
| - <!-- |
11 |
| - This website was carefully constructed by |
12 |
| - Interactive Studios |
13 |
| - http://www.interactivestudios.nl |
14 |
| - --> |
| 10 | + <!-- |
| 11 | + This website was carefully constructed by |
| 12 | + Interactive Studios |
| 13 | + http://www.interactivestudios.nl |
| 14 | + --> |
15 | 15 |
|
16 |
| - <title>FlexVerticalCenter test</title> |
| 16 | + <title>FlexVerticalCenter test</title> |
17 | 17 |
|
18 |
| - <style> |
19 |
| - body{ |
20 |
| - margin: 0; |
21 |
| - } |
22 |
| - .box { |
23 |
| - background: #333; |
24 |
| - height: 300px; |
25 |
| - margin-bottom: 30px; |
26 |
| - } |
27 |
| - .box2 { |
28 |
| - background: #ccc; |
29 |
| - height: 100px; |
30 |
| - } |
31 |
| - p { |
32 |
| - width: 20%; |
33 |
| - margin: 0 auto; |
34 |
| - color: #fff; |
35 |
| - font-weight: bold; |
36 |
| - } |
37 |
| - </style> |
| 18 | + <style> |
| 19 | + body{ |
| 20 | + margin: 0; |
| 21 | + } |
| 22 | + .box { |
| 23 | + background: #333; |
| 24 | + height: 300px; |
| 25 | + margin-bottom: 30px; |
| 26 | + } |
| 27 | + .box2 { |
| 28 | + background: #ccc; |
| 29 | + height: 100px; |
| 30 | + } |
| 31 | + p { |
| 32 | + width: 20%; |
| 33 | + margin: 0 auto; |
| 34 | + color: #fff; |
| 35 | + font-weight: bold; |
| 36 | + } |
| 37 | + </style> |
38 | 38 | </head>
|
39 | 39 |
|
40 | 40 | <body>
|
41 |
| - <div class="box"> |
42 |
| - <p class="first-item"> |
43 |
| - This box is 20% wide and is always vertically centered within its parent, even if the view port changes (resize your window to see the result). |
44 |
| - </p> |
45 |
| - </div> |
| 41 | + <div class="box"> |
| 42 | + <p class="first-item"> |
| 43 | + This box is 20% wide and is always vertically centered within its parent, even if the view port changes (resize your window to see the result). |
| 44 | + </p> |
| 45 | + </div> |
46 | 46 |
|
47 |
| - <div class="box"> |
48 |
| - <p class="second-item"> |
49 |
| - This box is 20% wide and is always vertically centered within its parent with a -50px offset, even if the view port changes (resize your window to see the result). |
50 |
| - </p> |
51 |
| - </div> |
| 47 | + <div class="box"> |
| 48 | + <p class="second-item"> |
| 49 | + This box is 20% wide and is always vertically centered within its parent with a -50px offset, even if the view port changes (resize your window to see the result). |
| 50 | + </p> |
| 51 | + </div> |
52 | 52 |
|
53 |
| - <div class="box parent"> |
54 |
| - <div class="box2"> |
55 |
| - <p class="third-item"> |
56 |
| - This box is 20% wide and is always vertically centered within the specified dark grey parent, even if the view port changes (resize your window to see the result). |
57 |
| - </p> |
58 |
| - </div> |
59 |
| - </div> |
| 53 | + <div class="box parent"> |
| 54 | + <div class="box2"> |
| 55 | + <p class="third-item"> |
| 56 | + This box is 20% wide and is always vertically centered within the specified dark grey parent, even if the view port changes (resize your window to see the result). |
| 57 | + </p> |
| 58 | + </div> |
| 59 | + </div> |
60 | 60 |
|
61 |
| - <script src="//ajax.googleapis.com/ajax/libs/jquery/1.9.1/jquery.min.js"></script> |
62 |
| - <script src="jquery.flexverticalcenter.js"></script> |
| 61 | + <script src="//ajax.googleapis.com/ajax/libs/jquery/1.9.1/jquery.min.js"></script> |
| 62 | + <script src="jquery.flexverticalcenter.js"></script> |
63 | 63 |
|
64 |
| - <script> |
65 |
| - $('.first-item').flexVerticalCenter({ cssAttribute: 'padding-top' }); |
66 |
| - $('.second-item').flexVerticalCenter({ cssAttribute: 'padding-top', verticalOffset: '50px' }); |
67 |
| - $('.third-item').flexVerticalCenter({ cssAttribute: 'padding-top', parentSelector: '.parent' }); |
68 |
| - </script> |
| 64 | + <script> |
| 65 | + $('.first-item').flexVerticalCenter({ cssAttribute: 'padding-top' }); |
| 66 | + $('.second-item').flexVerticalCenter({ cssAttribute: 'padding-top', verticalOffset: '50px' }); |
| 67 | + $('.third-item').flexVerticalCenter({ cssAttribute: 'padding-top', parentSelector: '.parent' }); |
| 68 | + </script> |
69 | 69 | </body>
|
70 | 70 |
|
71 | 71 | </html>
|
0 commit comments