[英]How to make my footer cover 100% height and width of the page from top?
[英]How to make a footer popup to cover all page?
我想做以下事情:
这可能吗?
我不想创建带有联系表单的页面,仅此而已。 我应该继续我的 index.html 页面底部的 #contacts,并使用 Parallax 或 FullPage.JS?
查看页面和代码: www.wemadeyou.pt
是的,这是可能的,而且不是很困难。 一种方法是在页面上创建一个div
并使用 css display: none
来隐藏div
。 然后在单击“联系人”菜单按钮时使用 jQuery 显示该div
。
就像是:
网址:
<body>
<p>Here is some content</p>
<div class="contact-form-container">
<form class="contact-form">
<!-- put your contact form here -->
</form>
</div>
</body>
CSS:
.contact-form-container {
display: none;
position: absolute;
width: 100%;
height: 100%;
background: rgba(0,0,0,0.25);
z-index: 200;
}
JS(jQuery):
$(document).ready(function() {
$('.contacts').click(function(e) { //or whatever the class/id of your menu button is
e.preventDefault();
$('.contact-form-container').toggle();
}
}
这将使您获得大部分途径。 当然,您仍然必须处理表单。
希望有帮助。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.