做html5 页面 在安卓手机上键盘 把底部导航顶上去了 怎么解决

做html5 页面 在安卓手机上键盘 把底部导航顶上去了 怎么解决,第1张

估计导航用的fixed定位吧,

var windheight =window.innerHeight         

 var bottomx = document.getElementById('bottomx') //底部导航

   window.onresize(function(){    var docheight = window.innerHeight         

    if(docheight < windheight){            

        bottomx.style.position = 'static'

    }else{

        bottomx.style.position = 'fixed'

    }     

   })

HTML5怎么把导航固定在底部的步骤如下:

css的定位样式属性来实现;会用到css中的position:fixed属性,结合来实现。

<style>.foot-menu{width:100%height:60pxbackground:#000position:fixedbottom:0/**距离底部为0*/left:0z-index:1}</style><div class="foot-menu">

<!---导航具体内容-->

</div>

拓展资料

css3网页底部固定导航是一款纯css3实现的网页底部固定导航菜单。特性介绍:

1、边框特性

CSS3对网页中的边框进行了一些改进,主要包括支持圆角边框、多层边框、边框色彩与图片等。在CSS3中最常用的一个改进就是圆角边框,通过CSS3的属性可以快速实现圆角定义,同时还可以根据实际情况针对特定角进行圆角定义 。

2、多背景图

CSS3允许使用多个属性(比如background-image、background-repeat、background-size、background-position、background-origin和background-clip等)在一个元素上添加多层背景图片。


欢迎分享,转载请注明来源:内存溢出

原文地址: https://outofmemory.cn/zaji/6273988.html

(0)
打赏 微信扫一扫 微信扫一扫 支付宝扫一扫 支付宝扫一扫
上一篇 2023-03-19
下一篇 2023-03-19

发表评论

登录后才能评论

评论列表(0条)

保存