CSS3 implements footer fixed at the bottom (always at the bottom no matter how high the page is)

Time:2020-4-1

Preface

Fix the footer area at the bottom, no matter how wide the page is, it will not change at the bottom, just like the menu on the mobile end.

<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8" />
<title>document</title>

<!-- css -->
<style>
#demo{
 position: fixed;
    left: 0px;
    bottom: 0px;
    width: 100%;
    height: 50px;
    background-color: #eee;
    z-index: 9999;
}
</style>

</head>
<body>
< footer id = "demo" > I'm a footer < / footer >
</body>
</html>

summary

The above is the CSS3 implementation that Xiaobian introduced to you to fix the footer at the bottom (no matter how high the page is always at the bottom), hoping to help you. If you have any questions, please leave a message to me, and Xiaobian will reply to you in time. Thank you very much for your support of the developepaer website!
If you think this article is helpful to you, welcome to reprint, please indicate the source, thank you!