Javascript 我不得不等了5分钟,我想你的回答太快了:谢谢你的努力,不过我认为大卫的回答更具体。但这也很有效,因此+1用于此项工作;)谢谢你的努力,不过我认为大卫的回答更具体。但这也很有效,因此+1用于此项工作;)谢谢你的努力,不过我认为大卫的回答更具体。但这也很有效,
Javascript 我不得不等了5分钟,我想你的回答太快了:谢谢你的努力,不过我认为大卫的回答更具体。但这也很有效,因此+1用于此项工作;)谢谢你的努力,不过我认为大卫的回答更具体。但这也很有效,因此+1用于此项工作;)谢谢你的努力,不过我认为大卫的回答更具体。但这也很有效,,javascript,jquery,html,css,Javascript,Jquery,Html,Css,我不得不等了5分钟,我想你的回答太快了:谢谢你的努力,不过我认为大卫的回答更具体。但这也很有效,因此+1用于此项工作;)谢谢你的努力,不过我认为大卫的回答更具体。但这也很有效,因此+1用于此项工作;)谢谢你的努力,不过我认为大卫的回答更具体。但这也很有效,因此+1用于此项工作;)谢谢你的努力,不过我认为大卫的回答更具体。但这也很有效,因此+1用于此项工作;) <html> <head> <link rel="stylesheet" type=
我不得不等了5分钟,我想你的回答太快了:谢谢你的努力,不过我认为大卫的回答更具体。但这也很有效,因此+1用于此项工作;)谢谢你的努力,不过我认为大卫的回答更具体。但这也很有效,因此+1用于此项工作;)谢谢你的努力,不过我认为大卫的回答更具体。但这也很有效,因此+1用于此项工作;)谢谢你的努力,不过我认为大卫的回答更具体。但这也很有效,因此+1用于此项工作;)
<html>
<head>
<link rel="stylesheet" type="text/css" href="css/main.css">
<link rel="stylesheet" type="text/css" href="css/header.css">
<script src="https://ajax.googleapis.com/ajax/libs/jquery/1.11.2/jquery.min.js"></script>
</head>
<body>
<div id="content_parent">
<!-- Header -->
<div id="header_parent">
<table class="menuItems">
<td>Button</td>
<td>Button</td>
<td>Button</td>
<td>Button</td>
<td>Button</td>
</table>
</div>
<!-- Body (homepage) -->
<div id="body_parent">
<h1>content-test</h1>
</div>
</div>
<!-- Footer -->
<div id="footer_parent">
</div>
<script src="js/animateheader.js"></script>
</body>
</html>
#content_parent {
max-width:1250px;
min-width:750px;
min-height:100%;
box-shadow:0 0 10px 2px rgb(180,180,180);
-webkit-box-shadow:0 0 10px 2px rgb(180,180,180);
-moz-box-shadow:0 0 10px 2px rgb(180,180,180);
}
#header_parent {
position:fixed;
right:0;
left:0;
margin-left:auto;
margin-right:auto;
max-width:1250px;
min-width:750px;
height:60px;
background-color:rgb(50,50,50);
box-shadow:-6px 0 rgba(0,0,0,0), 6px 0 rgba(0,0,0,0), 0 6px 4px -2px rgb(180,180,180);
-webkit-box-shadow:-6px 0 rgba(0,0,0,0), 6px 0 rgba(0,0,0,0), 0 6px 4px -2px rgb(180,180,180);
-moz-box-shadow:-6px 0 rgba(0,0,0,0), 6px 0 rgba(0,0,0,0), 0 6px 4px -2px rgb(180,180,180);
border-bottom-left-radius:2px;
-webkit-border-bottom-left-radius:2px;
-moz-border-bottom-left-radius:2px;
border-bottom-right-radius:2px;
-webkit-border-bottom-right-radius:2px;
-moz-border-bottom-right-radius:2px;
border-top-left-radius:0;
-webkit-border-top-left-radius:0;
-moz-border-top-left-radius:0;
border-top-right-radius:0;
-webkit-border-top-right-radius:0;
-moz-border-top-right-radius:0;
}
#body_parent {
padding-top:60px;
max-width:1250px;
min-width:750px;
background-color:rgb(245,245,245);
}
table.menuItems {
width:100%;
height:100%;
border-collapse:collapse;
border:0;
}
.menuItems td {
width:20%;
height:100%;
text-align:center;
color:rgb(230,230,230);
font-family:Sansation;
font-weight:bold;
font-size:25px;
}
$(window).on('scroll', function () {
var scrollTop = $(window).scrollTop();
if (scrollTop > 0) {
$('#header_parent').stop().animate({height: "40px"},50);
$('#body_parent').stop().animate({paddingTop: "40px"},45);
$('table.menuItems > td').stop().animate({fontSize: "18px"},50);
}
else {
$('#header_parent').stop().animate({height: "60px"},50);
$('#body_parent').stop().animate({paddingTop: "60px"},45);
$('table.menuItems > td').stop().animate({fontSize: "25px"},50);
}
});
$('table.menuItems > tbody > tr > td').stop().animate({fontSize: "18px"},50);
<div id="header_parent">
<table class="menuItems">
<tr>
<td>Button</td>
<td>Button</td>
<td>Button</td>
<td>Button</td>
<td>Button</td>
</tr>
</table>
</div>
$('table.menuItems td').stop().animate({fontSize: "25px"},50);
$('table.menuItems td').stop().animate({fontSize: "18px"},50);