Skip to content

Commit d655f55

Browse files
committed
项目实战练习-腾讯看比赛
1 parent b9f6213 commit d655f55

18 files changed

Lines changed: 208 additions & 2 deletions

File tree

20160720_腾讯看比赛官网项目实战/js/index.js

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -273,8 +273,10 @@ var url = window.location.href,
273273
var hash = reg.test(url) ? reg.exec(url)[1] : null;
274274

275275
var $curMenu = $(".menu a[href*='" + hash + "']");
276-
$curMenu.parent().addClass("bg").siblings().removeClass("bg");
277-
menuScroll.scrollToElement($curMenu.parent()[0], 300);
276+
if ($curMenu.length > 0) {
277+
$curMenu.parent().addClass("bg").siblings().removeClass("bg");
278+
menuScroll.scrollToElement($curMenu.parent()[0], 300);
279+
}
278280

279281
calendarModule.init(queryColumnId(hash));
280282

Lines changed: 60 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,60 @@
1+
html, body {
2+
width: 100%;
3+
overflow-x: hidden;
4+
}
5+
6+
.content {
7+
margin: 0 auto;
8+
width: 1360px;
9+
}
10+
11+
.content div {
12+
width: 100%;
13+
}
14+
15+
.content div img {
16+
display: block;
17+
width: 100%;
18+
}
19+
20+
.floor {
21+
display: none;
22+
position: fixed;
23+
left: 0;
24+
top: 50%;
25+
margin-top: -170px;
26+
width: 30px;
27+
height: 341px;
28+
overflow: hidden;
29+
z-index: 100;
30+
}
31+
32+
.floor li {
33+
position: relative;
34+
height: 30px;
35+
line-height: 30px;
36+
text-align: center;
37+
border-bottom: 1px solid #EEE;
38+
cursor: pointer;
39+
}
40+
41+
.floor li span {
42+
display: none;
43+
position: absolute;
44+
top: 0;
45+
left: 0;
46+
width: 30px;
47+
height: 30px;
48+
color: #c81623;
49+
background: #fff;
50+
}
51+
52+
.floor li.bg span {
53+
display: block;
54+
}
55+
56+
.floor li:hover span {
57+
display: block;
58+
color: #fff;
59+
background: #c81623;
60+
}

20160720_腾讯看比赛官网项目实战/京东/css/reset.min.css

Lines changed: 3 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.
1.5 MB
Loading
396 KB
Loading
556 KB
Loading
303 KB
Loading
326 KB
Loading
439 KB
Loading
342 KB
Loading

0 commit comments

Comments
 (0)