-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathdialog.html
129 lines (99 loc) · 1.92 KB
/
dialog.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
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
<html>
<head>
<title></title>
<style>
.dialog{
position:absolute;
z-index:2;
background-color:rgba(200,160,250,0.9);
left:0px;
top:0px;
width:0px;
height:0px;
transition:0.5s linear all;
border-bottom-right-radius:500%;
box-shadow:50px 50px 200px #0ff;
border-right:60px solid #0ff;
border-bottom:60px solid #0ff;
}
.openDialog{
position:absolute;
z-index:2;
background-color:rgba(2,255,255,1);
left:0px;
top:0px;
width:100%;
height:100vh;
transation:0.4s linear all;
border-radius:0px;
box-shadow:0px 0px 100px #f0f;
border-right:1px solid #0ff;
border-bottom:1px solid #0ff;
}
.icon{
box-shadow:0px 0px 4px #f0f;
width:30px;
height:30px;
float:right;
border-radius:25px;
margin:8px;
}
.items-open{
transition:0.4s linear all;
opacity:1;
}
.ic-menu{
position:absolute;
z-index:3;
left:10px;
top:10px;
}
li{
font-size:40px;
list-style-type:none;
text-align:center;
margin-bottom:10px;
}
ul{
margin-top:20%;
margin-right:10%;
}
</style>
<meta name="viewport" content="width=device-width, initial-scale=1.0"/>
</head>
<body>
<h1 style="text-align:center">WebSite</h1>
<div id="dialog" class="dialog">
<div class="ic-menu" id="openDialog" >
<img id="icDialog" src="img/ic_menu.png" width=30 height=30></img>
</div>
<ul id="items">
<li>home</li>
<li>shop</li>
<li>about</li>
</ul>
</div>
<script src="js/jquery-3.2.1.min.js">
</script>
<script>
$("#items").hide();
var isShow=false;
$(document).ready(()=>{
var isShow=false;
$("#openDialog").click((e)=>{
$("#openDialog").show();
if(!isShow){
$("#icDialog").attr("src","img/ic_close.png" );
isShow=true;
$("#items").delay(500).queue(function (next) { $(this).show(); next(); });
}else{
$("#icDialog").attr("src","img/ic_menu.png" );
isShow=false;
$("#items").delay(350).queue(function (next) { $(this).hide(); next(); });
}
$("#dialog").toggleClass("openDialog");
});
});
</script>
</body>
</html>