-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathz-index.html
79 lines (74 loc) · 1.9 KB
/
z-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
<!DOCTYPE html>
<html>
<head lang="en">
<meta charset="UTF-8">
<title></title>
<style>
body, html {
height: 100%;
width: 100%;
min-height: 100%;
padding: 0;
margin: 0;
}
.wrap {
min-width: 600px;
max-width: 1600px;
margin: 0 auto;
position: relative;
}
.main {
width: 100%;
height: auto;
min-height: 500px;
max-height: 1000px;
background: yellow;
position: absolute;
}
form{
margin: 0 auto;
width: 30%;
min-width: 300px;
margin-top: 5%;
/*
position: absolute;
left: 0;
right: 0;*/
border: 1px solid black;
}
input{
height: 25%;
margin-top: 2.5%;
display: block;
width: 100%;
}
</style>
</head>
<body>
<div class="wrap">
<div class="main">
<form action=""><input type="text"/><input type="email"/><input type="submit"/></form>
</div>
</div>
<!-- Make sure your CSS file is listed before jQuery -->
<link rel="stylesheet" href="uniform.default.css" media="screen"/>
<script src="http://ajax.googleapis.com/ajax/libs/jquery/1.8/jquery.min.js"></script>
<script src="jquery.uniform.js"></script>
<script>
$(document).ready(function () {
var w = $("form").width();
$("form").height(0.5 * w);
$(window).resize(function() {
var w = $("form").width();
$("form").height(0.5 * w);
});
$(function(){
$('.some_block').height($('.some_block').width()/2.5);
$(window).resize(function(){
$('.some_block').height($('.some_block').width()/2.5);
});
});
});
</script>
</body>
</html>