您好, 欢迎来到 !    登录 | 注册 | | 设为首页 | 收藏本站

固定位置在移动浏览器中不起作用

固定位置在移动浏览器中不起作用

position: fixed在大多数的旧版本中不工作iOSBlackBerry。我已经在大多数移动浏览器中尝试了此修复程序,并且没有任何JavaScript插件即可正常运行。

采用

.fixed {

  position: fixed;

  top: 0px;

  left: 0px;

  width: 320px;

  height: 50px;

  background: red;

  -webkit-backface-visibility: hidden;

  /*--^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ Most Important*/

}


<div class="fixed">

  Hi I m Position Fixed

</div>

<div>

  sample text

  <br/>sample text

  <br/>sample text

  <br/>sample text

  <br/>sample text

  <br/>sample text

  <br/>sample text

  <br/>sample text

  <br/>sample text

  <br/>sample text

  <br/>sample text

  <br/>sample text

  <br/>sample text

  <br/>sample text

  <br/>sample text

  <br/>sample text

  <br/>sample text

  <br/>sample text

  <br/>sample text

  <br/>sample text

  <br/>sample text

  <br/>sample text

  <br/>sample text

  <br/>sample text

  <br/>sample text

  <br/>sample text

  <br/>sample text

  <br/>sample text

  <br/>sample text

  <br/>sample text

  <br/>sample text

  <br/>sample text

  <br/>sample text

  <br/>sample text

  <br/>sample text

  <br/>sample text

  <br/>sample text

  <br/>sample text

  <br/>sample text

  <br/>sample text

  <br/>sample text

  <br/>sample text

  <br/>sample text

  <br/>sample text

  <br/>sample text

  <br/>sample text

  <br/>sample text

  <br/>sample text

  <br/>sample text

  <br/>



</div>
其他 2022/1/1 18:14:08 有686人围观

撰写回答


你尚未登录,登录后可以

和开发者交流问题的细节

关注并接收问题和回答的更新提醒

参与内容的编辑和改进,让解决方法与时俱进

请先登录

推荐问题


联系我
置顶