到目前为止,我已经将一个div固定在页面底部,并将底部边距设置为负数,以便将其大部分隐藏在屏幕下方。我想创建一个Jquery按钮,使它们全部滑动到页面上,但是到目前为止,我尝试过的所有方法都没有奏效。我对此并不是很有经验,所以可能一直做错了。
无论如何,这是我的CSS:
无论如何,这是我的CSS:
.foot {
border-top: 1px solid #999999;
position:fixed;
width: 600px;
z-index: 10000;
text-align:center;
height: 500px;
font-size:18px;
color: #000;
background: #FFF;
display: flex;
justify-content: center; /* align horizontal */
border-top-left-radius:25px;
border-top-right-radius:25px;
right: 0;
left: 0;
margin-right: auto;
margin-left: auto;
bottom: -475px;
}
我的HTML代码:
<div class="foot">
Copyright 2014 © Tom Gibbs web design. <div class="clocker">hi</div>
<br />
<br />
Line 1<br />
Line 2<br />
Line 3<br />
Line 4
</div>
我已经尝试过的代码。它只是让div向下滑出页面:
<script>
$(document).ready(function(){
$(".clocker").click(function(){
$(".foot").slideUp(2000);
});
});
</script>