[英]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.