-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathex-080.html
More file actions
217 lines (188 loc) · 5.75 KB
/
ex-080.html
File metadata and controls
217 lines (188 loc) · 5.75 KB
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
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
<!DOCTYPE html>
<html>
<head>
<link rel="stylesheet" type="text/css" href="css/bootstrap_232.min.css">
<meta charset="utf-8">
<title>[實作] Go-top 按鈕</title>
<style type="text/css">
body {
padding-top: 20px;
padding-bottom: 60px;
}
/* Custom container */
.container {
margin: 0 auto;
max-width: 1000px;
}
.container > hr {
margin: 60px 0;
}
/* Main marketing message and sign up button */
.jumbotron {
margin: 80px 0;
text-align: center;
}
.jumbotron h1 {
font-size: 100px;
line-height: 1;
}
.jumbotron .lead {
font-size: 24px;
line-height: 1.25;
}
.jumbotron .btn {
font-size: 21px;
padding: 14px 24px;
}
/* Supporting marketing content */
.marketing {
margin: 60px 0;
}
.marketing p + h4 {
margin-top: 28px;
}
/* Customize the navbar links to be fill the entire space of the .navbar */
.navbar .navbar-inner {
padding: 0;
}
.navbar .nav {
margin: 0;
display: table;
width: 100%;
}
.navbar .nav li {
display: table-cell;
width: 1%;
float: none;
}
.navbar .nav li a {
font-weight: bold;
text-align: center;
border-left: 1px solid rgba(255,255,255,.75);
border-right: 1px solid rgba(0,0,0,.1);
}
.navbar .nav li:first-child a {
border-left: 0;
border-radius: 3px 0 0 3px;
}
.navbar .nav li:last-child a {
border-right: 0;
border-radius: 0 3px 3px 0;
}
.content{
display: block; min-height: 400px;
margin: 1em 0;
}
.content > div{
margin: 2em 0;
}
.go-top{
position: fixed; padding: 8px;
width: 45px; height: 45px; line-height: 1.25;
background-color: #f00; color: #fff;
font-size: 18px; bottom: 50px; right: 50px;
}
.go-top:hover, .go-top:active, .go-top:visited, .go-top:focus{
background-color: #f00; color: #fff; text-decoration: none;
}
</style>
</head>
<body>
<div class="container">
<div class="masthead">
<div class="navbar">
<div class="navbar-inner">
<div class="container">
<ul class="nav">
<li data-show="home" class="nav-home"><a href="#">Home</a></li>
<li data-show="project" class="nav-projects"><a href="#">Projects</a></li>
<li data-show="services" class="nav-services"><a href="#">Services</a></li>
<li data-show="download" class="nav-download"><a href="#">Downloads</a></li>
<li data-show="about" class="nav-about"><a href="#">About</a></li>
<li data-show="contact" class="nav-contact"><a href="#">Contact</a></li>
</ul>
</div>
</div>
</div>
<!-- /.navbar -->
</div>
<!-- Jumbotron -->
<div class="jumbotron">
<h1>Hello 5xRuby!</h1>
<p class="lead">做好做滿的前端教學從這裡開始!</p>
<a class="started btn btn-large btn-success" href="#">Get started today</a>
</div>
<hr>
<div class="content">
<div class="content-home">
<h2>Home</h2>
<p><span class="lipsum"></span></p>
<p><span class="lipsum"></span></p>
<p><span class="lipsum"></span></p>
<p><span class="lipsum"></span></p>
</div>
<div class="content-project">
<h2>Projects</h2>
<p><span class="lipsum"></span></p>
<p><span class="lipsum"></span></p>
<p><span class="lipsum"></span></p>
<p><span class="lipsum"></span></p>
</div>
<div class="content-services">
<h2>Services</h2>
<p><span class="lipsum"></span></p>
<p><span class="lipsum"></span></p>
<p><span class="lipsum"></span></p>
<p><span class="lipsum"></span></p>
</div>
<div class="content-download">
<h2>Downloads</h2>
<p><span class="lipsum"></span></p>
<p><span class="lipsum"></span></p>
<p><span class="lipsum"></span></p>
<p><span class="lipsum"></span></p>
</div>
<div class="content-about">
<h2>About</h2>
<p><span class="lipsum"></span></p>
<p><span class="lipsum"></span></p>
<p><span class="lipsum"></span></p>
<p><span class="lipsum"></span></p>
</div>
<div class="content-contact">
<h2>Contact</h2>
<p><span class="lipsum"></span></p>
<p><span class="lipsum"></span></p>
<p><span class="lipsum"></span></p>
<p><span class="lipsum"></span></p>
</div>
</div>
<hr>
<div class="footer">
<p>© Company 2013</p>
</div>
</div>
<!-- /container -->
<a href="#" class="go-top">回頂端</a>
<script src="scripts/jquery-3.1.0.js"></script>
<script src="http://more.handlino.com/javascripts/moretext-1.2.js" type="text/javascript"></script>
<script type="text/javascript">
// 判斷瀏覽器捲軸
$(window).on('scroll', function(){
window.setTimeout(function(){
if( $(document).scrollTop() >= 400 ){
$('.go-top').fadeIn();
}
else{
$('.go-top').fadeOut();
}
}, 100);
});
// todo: 透過 animate & scrollTop: 0 將捲軸送至頂端
$('.go-top').on('click', function(e){
e.preventDefault();
$('html, body').animate({ scrollTop: 0}, 1000);
});
</script>
</body>
</html>