Let the bottom of the page float and fix it_html/css_WEB-ITnose

WBOY
Release: 2016-06-24 11:50:56
Original
1615 people have browsed it

??

1. Get the screen height,

2. Get the page height.

3. Determine the size between the two. When the page height is greater than the screen height, the floating background style is not added. Otherwise add it. Don't judge whether to scroll the screen.

Get the screen height $(window).height();$(document).height();

Floating to the bottom fabric:

.footer{

position:fixed;

width:100%;

display:block;

bottom:0;

}

source:php.cn
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template
About us Disclaimer Sitemap
php.cn:Public welfare online PHP training,Help PHP learners grow quickly!