随笔分类 -  移动端开发

CSS3,HTML5,Andriod,ios
摘要:1.图片自动等比例缩放{display:block;width:100%; height:auto;} 阅读全文
posted @ 2014-05-12 19:22 hlp鹏 阅读(131) 评论(0) 推荐(0) 编辑
摘要:手机识别:varisAndroid=navigator.appVersion.toLowerCase().indexOf(‘android’)>=0,isIphone=navigator.appVersion.toLowerCase().indexOf(‘iphone’)>=0;if(isAndroid){window.location.href=”XXX.html”;} 阅读全文
posted @ 2014-03-07 17:35 hlp鹏 阅读(138) 评论(0) 推荐(0) 编辑
摘要:用CSS判断横屏竖屏问题。CSS代码如下1、@media (orientation: portrait) { } 横屏@media (orientation: landscape) { }竖屏2、横屏竖屏用JavaScript判断横屏竖屏问题。JavaScript代码如下//判断手机横竖屏状态:function hengshuping(){if(window.orientation==180||window.orientation==0){alert("竖屏状态!") }if(window.orientation==90||window.orientation==-90){ 阅读全文
posted @ 2014-01-24 18:04 hlp鹏 阅读(261) 评论(0) 推荐(0) 编辑

点击右上角即可分享
微信分享提示