84669 person learning
152542 person learning
20005 person learning
5487 person learning
7821 person learning
359900 person learning
3350 person learning
180660 person learning
48569 person learning
18603 person learning
40936 person learning
1549 person learning
1183 person learning
32909 person learning
单页面应用里,想让footer固定在底部,用的postion,然而如果文章内容超出一屏,footer就会定位在一屏的地方。如果不写html 100%的宽度,其他不足一屏的页面定位就不在页面底部了,有什么解决的方案吗?
勇敢站起来快步向前冲是你唯一的出路
Wide adaptive problem? -PHP Chinese website Q&A-Wide adaptive problem? -PHP Chinese website Q&A
Let’s take a look and learn.
<!DOCTYPE html> <html> <head> <style> * { margin: 0; padding: 0; } html, body { height: 100%; } div { position: relative; min-height: 100%; } footer { position: absolute; bottom: 0px; background: grey; width: 100%; height: 50px; } p { height: 2000px; } </style> </head> <body> <div> <p></p> <footer>123</footer> </div> </body> </html>
Wide adaptive problem? -PHP Chinese website Q&A-Wide adaptive problem? -PHP Chinese website Q&A
Let’s take a look and learn.