/
index.html
94 lines (87 loc) · 1.47 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
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<title>Javascript Fetch APi</title>
<style type="text/css">
#myDiv{
float: left;
margin: 80px 80px;
}
#list{
float: right;
width: auto;
display: flex;
flex-direction: column;
justify-content: flex-start;
align-items: center;
box-sizing: border-box;
margin-right: 500px;
}
ul {
list-style: none;
padding: 0;
}
li{
padding: 5px 10px;
width: 300px;
background-color: #fff;
border:1px solid;
color: black;
}
input{
width:15rem;
margin: 10px 0;
padding: 5px 10px;
border-radius: 15px;
border-color: red;
}
button{
border-color: green;
padding: 10px;
margin: 4px 2px;
cursor: pointer;
width: 5rem;
border-radius: 5px;
font-weight: bold;
}
button:hover{
width: 6rem;
transition: 0.4s ease-in-out;
background-color: green;
color: #fff;
}
@media (max-width: 600px) {
input{
width: 140%;
display: block;
margin-bottom:20px;
}
#myDiv{
margin-bottom: 10px;
}
#list{
margin:30px 30px;
}
}
</style>
</head>
<body>
<div id="myDiv">
<div>
<input type="text" id="name" placeholder="enter name...">
</div>
<div>
<input type="text" id="email" placeholder="enter email..">
</div>
<div>
<button id="submit"> Submit </button>
</div>
</div>
<div>
<div id="list">
</div>
</div>
<script type="text/javascript" src="api.js"></script>
</body>
</html>