[英]How to make a footer popup to cover all page?
I want to do the following:我想做以下事情:
Is this possible?这可能吗?
I don't want to create a page with contact forms, just for this.我不想创建带有联系表单的页面,仅此而已。 I should just continue my index.html page with #contacts on bottom, and use Parallax or FullPage.JS?我应该继续我的 index.html 页面底部的 #contacts,并使用 Parallax 或 FullPage.JS?
See the page & code: www.wemadeyou.pt查看页面和代码: www.wemadeyou.pt
Yes this is possible and not very difficult.是的,这是可能的,而且不是很困难。 One way you can do it make a div
on the page and use css display: none
to hide the div
.一种方法是在页面上创建一个div
并使用 css display: none
来隐藏div
。 Then use jQuery to show that div
when the 'Contacts' menu button is clicked.然后在单击“联系人”菜单按钮时使用 jQuery 显示该div
。
Something like:就像是:
Html:网址:
<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: CSS:
.contact-form-container {
display: none;
position: absolute;
width: 100%;
height: 100%;
background: rgba(0,0,0,0.25);
z-index: 200;
}
JS (jquery): 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();
}
}
This will get you most of the way there.这将使您获得大部分途径。 You will still have to handle the form of course.当然,您仍然必须处理表单。
Hope that helps.希望有帮助。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.