苏宁易购微信端 wx ios android other 通过js来控制样式

 

 

 

 

 

 1 <!DOCTYPE HTML><html><head><meta charset="UTF-8"><meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=0"><meta name="apple-mobile-web-app-capable" content="yes"><meta name="apple-mobile-web-app-status-bar-style" content="black"><meta content="telephone=no" name="format-detection"><meta name="wap-font-scale" content="no"><title>玩法介绍</title><link rel="stylesheet" type="text/css" href="//res.suning.cn/public/v5/common/2.0.0/m-common.css"><script type="text/javascript">
 2 !function(){
 3 var UA = window.navigator.userAgent,
 4 docEl = document.documentElement;
 5 window.device = {
 6 isApp : UA.match(/SNEBUY-APP;?/i) ? true : false,
 7 isAndroid : UA.match(/android/i) ? true : false,
 8 isIOS : UA.match(/(iPhone|iPod|iPad);?/i) ? true : false,
 9 isWX : UA.match(/MicroMessenger/i) ? true : false
10 };
11 docEl && device.isApp && (docEl.className += ' sn-app');
12 docEl && device.isAndroid && (docEl.className += ' android');
13 docEl && device.isIOS && (docEl.className += ' ios');
14 docEl && device.isWX && (docEl.className += ' wx');
15 }()
16 </script><style type="text/css">
17 .sn-app .sn-nav,
18 .wx .sn-nav {
19 display: none
20 }
21 body {
22 margin: 0 auto;
23 max-width: 15rem;
24 }
25 </style></head><body><div class="sn-nav sn-block"><div class="sn-nav-back"><a class="sn-iconbtn" href="javascript:history.go(-1);">返回</a></div><div class="sn-nav-title of f34">玩法介绍</div></div><div class="main-content" style="background:url(assets/images/group/fullpage.png) center no-repeat;background-size: 100%;width:15rem;height:25.64rem"></div></body></html>

 

 1 <!DOCTYPE HTML>
 2 <html>
 3 <head>
 4     <meta charset="UTF-8">
 5     <meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=0">
 6     <meta name="apple-mobile-web-app-capable" content="yes">
 7     <meta name="apple-mobile-web-app-status-bar-style" content="black">
 8     <meta content="telephone=no" name="format-detection">
 9     <meta name="wap-font-scale" content="no">
10     <title>玩法介绍</title>
11     <link rel="stylesheet" type="text/css" href="//res.suning.cn/public/v5/common/2.0.0/m-common.css">
12     <script type="text/javascript">
13         !function () {
14             var UA = window.navigator.userAgent,
15                 docEl = document.documentElement;
16             window.device = {
17                 isApp: UA.match(/SNEBUY-APP;?/i) ? true : false,
18                 isAndroid: UA.match(/android/i) ? true : false,
19                 isIOS: UA.match(/(iPhone|iPod|iPad);?/i) ? true : false,
20                 isWX: UA.match(/MicroMessenger/i) ? true : false
21             };
22             docEl && device.isApp && (docEl.className += ' sn-app');
23             docEl && device.isAndroid && (docEl.className += ' android');
24             docEl && device.isIOS && (docEl.className += ' ios');
25             docEl && device.isWX && (docEl.className += ' wx');
26         }()
27     </script>
28     <style type="text/css">
29         .sn-app .sn-nav,
30         .wx .sn-nav {
31             display: none
32         }
33 
34         body {
35             margin: 0 auto;
36             max-width: 15rem;
37         }
38     </style>
39 </head>
40 <body>
41 <div class="sn-nav sn-block">
42     <div class="sn-nav-back"><a class="sn-iconbtn" href="javascript:history.go(-1);">返回</a></div>
43     <div class="sn-nav-title of f34">玩法介绍</div>
44 </div>
45 <div class="main-content"
46      style="background:url(assets/images/group/fullpage.png) center no-repeat;background-size: 100%;width:15rem;height:25.64rem"></div>
47 </body>
48 </html>

 

posted @ 2017-02-12 19:07  papering  阅读(284)  评论(0编辑  收藏  举报