[英]Show footer at the bottom of the page always problem with Internet Explorer 11
I'm developing an ASP.NET
website with Visual Studio 2019
, C#
and .NET Framework 4.7
我正在使用
Visual Studio 2019
、 C#
和.NET Framework 4.7
开发ASP.NET
网站
On the masterpage I have inserted this css class
because all my pages have vertical scrollbar and I want to show <footer>
always at the bottom of the page.在母版页上,我插入了这个
css class
因为我所有的页面都有垂直滚动条,我想总是在页面底部显示<footer>
。
On the browsers Google Chrome
and Microsoft Edge
this css class
working correctly, but in browser Internet Explorer 11
the footer text moves along with the web page.在浏览器
Google Chrome
和Microsoft Edge
此css class
正常工作,但在浏览器Internet Explorer 11
,页脚文本随网页一起移动。
How can I do it?我该怎么做?
footer{
position:fixed;
bottom:0;
}
<div>
<footer>
<p style="font-size:20px">My Company</p>
</footer>
</div>
It is actualy working fine all browser, just make sure that you set CSS correctly.它实际上在所有浏览器中都可以正常工作,只需确保正确设置 CSS。
style
in head
head
style
中的 CSS <!DOCTYPE html> <html> <head> <title>Page Title</title> <style> .p{ height: 200vh; background:red; } footer{ position:fixed; bottom:0; background: yellow; } </style> </head> <body> <h1>This is a Heading</h1> <p class="p">This is a paragraph.</p> <div> <footer> <p style="font-size:20px">My Company</p> </footer> </div> </body> </html>
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.