【问题标题】:How to make a fixed div in IE10 Mobile?如何在 IE10 Mobile 中制作固定 div?
【发布时间】:2013-01-07 05:46:39
【问题描述】:

如何在 Windows Phone 8 上制作与 IE10 Mobile 一起使用的固定 div?我目前使用的代码是:

<div style="position:fixed;width:100%;background-color:blue;">
    test
</div>

这只是部分有效。当用户滚动时,div 滑回原来的位置。它在横向上也根本不起作用。是否有任何其他方法可以制作 Internet Explorer 10 移动版支持的不移动的固定 div?

【问题讨论】:

    标签: html css windows-phone windows-phone-8 internet-explorer-10


    【解决方案1】:
    div 
    {
        position:fixed;
        width:100%;
        background:blue;
        top:0; /* bottom:0 */
        left:0; /* right:0 */
        height:200px; /* You can specify here as you want */
    }
    

    使用position:fixed 时,您必须至少给出一个侧面声明。它应该保持固定的地方,例如top:0;

    【讨论】:

    • 做到了,在 ie mobile 之外从未遇到过这个问题
    猜你喜欢
    • 2015-05-31
    • 2011-01-10
    • 2022-09-26
    • 1970-01-01
    • 1970-01-01
    • 2013-11-27
    • 2015-01-13
    • 2019-10-24
    • 2021-04-25
    相关资源
    最近更新 更多