-
Notifications
You must be signed in to change notification settings - Fork 0
/
hcgc.html
70 lines (60 loc) · 2.24 KB
/
hcgc.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
<!DOCTYPE html>
<html lang="zh-CN">
<head>
<meta charset="UTF-8">
<title>合成过程</title>
<link rel="shortcut icon" href="favicon.ico" media="screen" />
<meta name="description" contect="">
<meta name="keywords" contect="">
<meta name="copyright" content="">
<meta http-equiv="X-UA-Compatible" content="IE=Edge,chrome=1">
<link rel="stylesheet" href="css/style.css">
<script src="js/jquery-1.11.1.min.js"></script>
<script src="js/main.js"></script>
</head>
<body>
<div class="actGotop totop"><a href="javascript:;" title="Top"></a></div>
<!-- 头部导航 -->
<div class="head" id="head"><div class="top"><div class="logo"><img src="images/logo.png"></div>
<div class="nav"><ul>
<li><a href="index.html">首页</a></li>
<li><a href="index.html#jianjie">简介</a></li>
<li><a href="index.html#zuopin">作品</a></li>
<li><a href="index.html#guocheng">过程</a></li>
<li><a href="index.html#lianxi">联系</a></li>
</ul>
</div>
</div>
</div>
<!-- 图片内容 -->
<div class="picwrapbox">
<img src="images/bg.jpg" align="top">
<div class="picwrap" id="picwrap"></div>
</div>
<script type="text/javascript">
$(function(){
$(".workli").each(function(i) {
$(this).mouseenter(function(){
$(".yellow").animate({left:290*i+20+'px'});
});
});//这个是首页作品的效果
$(".tops").click(function(){
if ($('html').scrollTop()) {
$('html').animate({ scrollTop: 0 }, 1000);
return false;
}
$('body').animate({ scrollTop: 0 }, 1000);
return false;
});//这个是返回顶部的效果
$(window).scroll(function() {
if($(window).scrollTop() >= 500){ //向下滚动像素大于这个值时,即出现小火箭~
$('.actGotop').fadeIn(500); //火箭淡入的时间,越小出现的越快~
}else{
$('.actGotop').fadeOut(500); //火箭淡出的时间,越小消失的越快~
}
});
$('.actGotop').click(function(){$('html,body').animate({scrollTop: '0px'}, 800);}); //火箭动画停留时间,越小消失的越快~
});
</script>
</body>
</html>