-
Notifications
You must be signed in to change notification settings - Fork 0
/
contact.html
173 lines (156 loc) · 5.66 KB
/
contact.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
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8">
<title>花花的個人網站</title>
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1">
<link rel="stylesheet" href="https://cdn.jsdelivr.net/bootstrap/3.3.0/css/bootstrap.min.css">
<link rel="stylesheet" href="https://cdn.jsdelivr.net/bootstrap/3.3.0/css/bootstrap-theme.min.css">
<link rel="shortcut icon" href="http://s101056044-html5.lionfree.net/ico/gift.ico">
<script src="http://code.jquery.com/jquery-1.11.0.min.js"></script>
<script>
$(document).ready(function(){
nav_to_white();
$("#all_black").click(function(){
$('#shield').hide();
$(".container-fluid").hide();
$('body').css('background-color','#000');
$div = $("<div class='container'><div class='row' style='text-align: center'><div id='push'></div><div id='push'></div><div id='push'></div><div id='push'></div><div id='pushs'></div><div class='col-xs-12 col-sm-4 col-md-4'></div><div class='col-xs-12 col-sm-4 col-md-4'><button type='button' class='btn btn-default' id='cancel_black' style='color: #000; font-size: 20px'>取消國防布</button></div><div class='col-xs-12 col-sm-4 col-md-4'></div></div></div>");
$('body').append($div);
$("#cancel_black").on('click',function(){
$('#shield').show();
$(".container-fluid").show();
$('body').css('background-color','#FFB5CE');
$div.remove();
}).on('mouseenter',function(){
$(this).animate({
opacity:'0.3',
height:'+=10px',
width:'+=15px'
});
});
});
function nav_to_white(){ // 讓上方的navbar的元素有白色跑馬燈特效
var head_arr = ["#home","#about","#contact","#login","#info"];
var head_color = ["#F87274","#F0A01C","#F1EE8F","#8AE194","#5B81E9"];
for (i = 0 ; i < head_arr.length ; i++){
$(head_arr[i]).css('color',head_color[i]);
}
function auto_count(){ // 用來控制變色的index的anonymous function,本身記錄index
var count = 0;
return function(){
if (count >= 5)
count = 0;
return count++;
};
}
var set_count = auto_count(); // 為anonymous function取名
setInterval(function(){
var temp = nav_assign_white(set_count()); // 記錄這次變色元素的index
var pause_timer = setInterval(function(){
nav_restore_color(temp); // 還原該元素的色彩
clearInterval(pause_timer);
},1500);
},1500);
}
function nav_assign_white(element){ // 把元素顏色變白色
var head_arr = ["#home","#about","#contact","#login","#info"]
$(head_arr[element]).css('color',"white");
return element;
}
function nav_restore_color(element){ // 讓上方的已變色的navigator元素變回原色的函式
var head_arr = ["#home","#about","#contact","#login","#info"];
var head_color = ["#F87274","#F0A01C","#F1EE8F","#8AE194","#5B81E9"];
$(head_arr[element]).css('color',head_color[element]);
}
});
</script>
</head>
<style>
body{
background-color: #FFB5CE;
font-family: Arial, "文泉驛正黑", "WenQuanYi Zen Hei", "微軟正黑體", "Microsoft JhengHei", "標楷體", DFKai-SB,
sans-serif;
}
#push{
height: 100px;
}
#pushl{
height: 150px;
}
#pushs{
height: 40px;
}
#pusht{
height: 20px;
}
.navbar-nav > li > a{
font-size: 14px;
font-weight: bold;
}
.navbar-inverse .navbar-brand{
font-size: 24px;
color: #FFE0EB;
}
.nav > li > a{
padding-left: 18px;
}
.jumbotron{
background-color: #FFFFC2;
}
.btn, .btn-default{
font-weight: bold;
}
</style>
<body>
<div id="shield">
<nav role="navigation" class="navbar navbar-inverse navbar-fixed-top">
<div class="container">
<div class="navbar-header">
<button type="button" data-target="#navbarCollapse" data-toggle="collapse" class="navbar-toggle">
<span class="sr-only"></span>
<span class="icon-bar"></span>
<span class="icon-bar"></span>
<span class="icon-bar"></span>
</button>
<a id="all_black" class="navbar-brand" href="#"><strong>國防布</strong></a>
</div>
<div id="navbarCollapse" class="collapse navbar-collapse">
<ul class="nav navbar-nav">
<li>
<a href="index.html" id="home"><span class="glyphicon glyphicon-home"></span> 首頁</a>
</li>
</ul>
<ul class="nav navbar-nav navbar-right">
<li>
<a href="about.html" id="about"><span class="glyphicon glyphicon-info-sign"></span> 關於我</a>
</li>
<li>
<a href="#contact" id="contact"><span class="glyphicon glyphicon-envelope"></span> 聯絡我</a>
</li>
<li>
<a href="http://speechlab.cs.nchu.edu.tw/nchu-tw-pinyin/" id="login"><span class="glyphicon glyphicon-user"></span> 作品欣賞</a>
</li>
<li>
<a href="#" id="info"><span class="glyphicon glyphicon-heart"></span> 關於本站</a>
</li>
</ul>
</div>
</div>
</nav>
</div>
<div class="container">
<div class="row">
<div id="push"></div>
<div class="col-xs-12 col-sm-4 col-md-4">
</div>
<div class="col-xs-12 col-sm-4 col-md-4">
</div>
<div class="col-xs-12 col-sm-4 col-md-4">
</div>
</div>
</div>
<script src="https://cdn.jsdelivr.net/bootstrap/3.3.0/js/bootstrap.min.js"></script>
</body>
</html>