css: hide or dispaly div

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
<!DOCTYPE html>
<html>
<head><meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<meta name="renderer" content="webkit" />
<meta http-equiv="X-UA-Compatible" content="IE=Edge,chrome=1" />
<meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1,user-scalable=no" />
<meta name="format-detection" content="telephone=no" />
    <meta http-equiv="Content-Security-Policy" content="upgrade-insecure-requests" />
    <title>六福会员</title>
    <meta name="author" content="geovindu,Geovin Du,GeovinDu,涂聚文"/>
     <link href="css/css.css" rel="stylesheet" type="text/css" />
       <link rel="stylesheet" href="https://code.jquery.com/ui/1.10.3/themes/smoothness/jquery-ui.css" />
  <script type="text/javascript" src="https://code.jquery.com/jquery-1.9.1.js"></script>
  <script type="text/javascript" src="https://code.jquery.com/ui/1.10.3/jquery-ui.js"></script>
 
<style type="text/css">
html {-webkit-text-size-adjust: 100%;-ms-text-size-adjust: 100%;}
/* 取消链接高亮  */
body,div,ul,li,ol,h1,h2,h3,h4,h5,h6,input,textarea,p,dl,dt,dd,a,img,button,form,table,th,tr,td,tbody,article,
aside, details,figcaption,figure,footer,header,hgroup, menu,nav,section{ -webkit-tap-highlight-color:rgba(0, 0, 0, 0); }
/* 设置HTML5元素为块 */
article, aside, details,figcaption,figure,footer,header,hgroup, menu,nav,section {display: block;}
/* 图片自适应 */
img{max-width: 100%;height: auto;width:auto\9; /* ie8 */-ms-interpolation-mode:bicubic;/*为了照顾ie图片缩放失真*/}
/*取消chrome表单自动填充颜色*/
html{height: 100%;font-size: 16px;}
body{height: 100%;color: #fff;line-height:1.5;
    font-family: "Helvetica Neue", Helvetica, Arial,Tahoma,"Microsoft YaHei", "PingFang SC", "Hiragino Sans GB", "Heiti SC", "WenQuanYi Micro Hei", sans-serif;}
body,ul,li,ol,h1,h2,h3,h4,h5,h6,textarea,select,p,dl,dt,dd,a,img,button,form,table,th,tr,td,tbody,article,
aside, details,figcaption,figure,footer,header,hgroup, menu,nav,section{margin:0; padding:0;border:none;}
 
@media screen and (min-device-width:767px)and (max-device-width: 2768px){
    .main{padding-top: 0;}
    .main{width: 90%;padding: 0;text-align: left;}
    .tbmain{width: 600px;}
    .lblsuccess{width:600px; padding-left:50px; padding-right:50px; left:10px;margin-left:20px}
    .foo{width:50px;  margin-left:0px; text-align:left;font-size: 14px;height: 24px;}
     
}
 
@media screen and (min-device-width:575px) and (max-device-width: 768px)
{
    .main{padding-top: 0;}
    .main{width: 90%;padding: 0;text-align: left;}
    .tbmain{width: 500px;}
    .lblsuccess{ width:500px; padding-left:50px;padding-right:50px; left:10px;margin-left:20px}
    .foo{width:50px; margin-left:0px; text-align:left;font-size: 14px;height: 24px;}
    
}
 
@media screen and (min-device-width: 375px) and (max-device-width: 500px) and (-webkit-min-device-pixel-ratio: 2) {
    .main{padding-top: 0;}
    .main{width: 90%;padding: 0;text-align: left;}
    .tbmain{width: 400px;}
    .lblsuccess{width:400px; padding-left:50px;padding-right:50px; left:10px; margin-left:20px}
    .foo{width:50px; margin-left:0px; text-align:left;font-size: 14px;height: 24px;}
     
}
 
.txtTel
{
    margin:0;padding:4px 8px;float:left;background:#EEE;border:medium none;border-radius:2px 0 0 2px;color:#B3B3B3;font-size:13px;height:20px;line-height:20px;width:120px;
}
 
.ui-datepicker-year{
    display:none;
    }
     .ui-datepicker-dayNamesMin{
    display:none;
    }
  .HideTodayButton .ui-datepicker-buttonpane .ui-datepicker-current
{
    visibility:hidden;
}
 
</style>
<script type="text/javascript" src="\\\\https://res.wx.qq.com/open/js/jweixin-1.3.2.js"></script>
 <script type="text/javascript" language="javascript">
 
    //var ua = window.navigator.userAgent.toLowerCase(); 
    //return ua.match(/MicroMessenger/i) == "micromessenger";
    //if(ua.match(/MicroMessenger/i) == "micromessenger")
    //{
     // alter("weixin");
   // }
     //关闭当前窗口有效方法一
     function closeWin()
     {
          
      var ua = window.navigator.userAgent.toLowerCase();
        if(ua.match(/MicroMessenger/i) == 'micromessenger'){   
             //判断是否是微信环境      
             //微信环境
            wx.miniProgram.getEnv(function(res) {
                 if (res.miniprogram) {
                // 小程序环境下逻辑
                  wx.miniProgram.navigateTo({url: '/pages/index/index'})      
                }else {
                //非小程序环境下逻辑
                 WeixinJSBridge.call('closeWindow');
               }
            })
            
         }
         else
         {
 
                   alert("非微信环境逻辑 Ok");
                    window.opener = null;
                    window.open("about:blank", "_self");
                    window.close();
        }
          
     }
 
      
      
   function HideDiv()
  {
   
 
           //$("#dudialog").hide();
          // $("#dudialog").css('display','none');
       var ua = window.navigator.userAgent.toLowerCase();
       
      /* var userAgent = navigator.userAgent.toLowerCase();
       if(userAgent.indexOf('micromessenger') > -1 || userAgent.indexOf('linux') > -1){
        
        }
       else
       {
            $("#dudialog").hide();
           $("#dudialog").css('display','none');
          alter("geovindu1");
       }*/
       if(ua.match(/MicroMessenger/i) == 'micromessenger'){   
             //判断是否是微信环境      
             //微信环境
            wx.miniProgram.getEnv(function(res) {
                 if (res.miniprogram) {
                    // 小程序环境下逻辑
                     $("#dudialog").css("display","block");                                      
                    $("#dudialog").show();
                }else {
                //非小程序环境下逻辑
                 $("#dudialog").hide();
               }
            })
            
         }
         else
         {
          //非微信环境逻辑
           //$("#dudialog").hide();
           //$("#dudialog").css('display','none');     
                 $("#dudialog").css("display","block");                                      
                    $("#dudialog").show();
            //alert("geovindu");
        }
   }
      
  
   $(function(){  
        
  
      
 
      //小程序X關閉this.closePage
   $('#dudialog').on('click tap', function() {
    wx.miniProgram.getEnv(function(res) {
     if(res.miniprogram){  //判断小程序环境     
      wx.miniProgram.navigateTo({url: '/pages/index/index'})      
     }   
    })             
   })
   //关闭当前窗口有效方法二
    $('#dudialog').click(function(){
         
         
        var ua = window.navigator.userAgent.toLowerCase();
        if(ua.match(/MicroMessenger/i) == 'micromessenger'){   
             //判断是否是微信环境      
             //微信环境
            wx.miniProgram.getEnv(function(res) {
                 if (res.miniprogram) {
                // 小程序环境下逻辑
                  wx.miniProgram.navigateTo({url: '/pages/index/index'})      
                }else {
                //非小程序环境下逻辑
                 WeixinJSBridge.call('closeWindow');
               }
            })
            
         }
         else
         {
 
                   alert("非微信环境逻辑 Ok");
                    window.opener = null;
                    window.open("about:blank", "_self");
                    window.close();
        }
              // alert("geovindu2");
        /*
            var userAgent = navigator.userAgent.toLowerCase();
            if (userAgent.indexOf("firefox") != -1 || userAgent.indexOf("chrome") !=-1) {
                 window.location.href="about:blank";
            }
            else if(userAgent.indexOf('android') > -1 || userAgent.indexOf('linux') > -1){
                window.opener=null;window.open('about:blank','_self','').close();
            }
            else if(userAgent.indexOf('micromessenger') > -1 || userAgent.indexOf('linux') > -1){
                wx.miniProgram.getEnv(function(res) {
                  if (res.miniprogram) {
                      // 走在小程序的逻辑
                      //$("#dudialog").css("display","block");
                      //$("#dudialog").show();
                      //alert("geovindu");
                      wx.miniProgram.navigateTo({url: '/pages/index/index'});
                    }
                else
                {
                    $("#dudialog").hide();
                    $("#dudialog").css('display','none');
                    //微信环境
                    WeixinJSBridge.call('closeWindow');
                }
            })//微信小程序
            }
            else {
                    //$("#dudialog").hide();
                    //$("#dudialog").css('display','none');
                    alert("geovindu3");
                    window.opener = null;
                    window.open("about:blank", "_self");
                    window.close();
                }
    */
     
});
 
   //JS监听手机端浏览器的后退按钮的事件方法
   pushHistory();
    window.addEventListener("popstate", function(e) {
    //,后检测是JAVA的短信接口原因。与自己的程序无关。后找服务提供商处理。java也要考虑客户端的环境。根据自己的需求实现自己的功能
    //window.open('https://www.lukfook.com/sc/customer-centre/vip-zone/vip-login/');
        //关闭当前窗口有效方法三
        var ua = window.navigator.userAgent.toLowerCase();
        if(ua.match(/MicroMessenger/i) == 'micromessenger'){   
             //判断是否是微信环境      
             //微信环境
            wx.miniProgram.getEnv(function(res) {
                 if (res.miniprogram) {
                // 小程序环境下逻辑
                  wx.miniProgram.navigateTo({url: '/pages/index/index'})      
                }else {
                //非小程序环境下逻辑
                 WeixinJSBridge.call('closeWindow');
               }
            })
            
         }
         else
         {
 
                   alert("非微信环境逻辑 Ok");
                    window.opener = null;
                    window.open("about:blank", "_self");
                    window.close();
        }
    //window.open('http://www1.lukfook.com.hk/lukfookvip_sc/VipFindPasswordSC.aspx');
         
         
         
  }, false);
  
  function pushHistory() {
    var state = {
    title: "title",
    url: "#"
  };
       window.history.pushState(state, "title", "#");
  }
  //PC端浏览器使用jquery监听
  /*
  $(document).ready(function(e) {
  var counter = 0;
  if (window.history && window.history.pushState) {
    $(window).on('popstate', function () {
    window.history.pushState('forward', null, '#');
    window.history.forward(1);
    window.location.href='//kefu.shtml';//跳转到个人中心
  });
}
  window.history.pushState('forward', null, '#'); //在IE中必须得有这两行
  window.history.forward(1);
});
  */
        //设定日期选择器的相关属性
        var pickerOpts = {
         //appendText: "(yyyy-mm-dd)",
         changeMonth: true,
         changeYear: true,
         dateFormat: "mm-dd",//yy-mm-dd
        // dayNamesMin:["一","二","三","四","五","六","日"],
         firstDay: 0,
        nextText: "下一月",
        prevText: "上一月",
        closeText: "关闭",
        currentText: "今天",
        monthNamesShort: ["一月", "二月", "三月", "四月", "五月", "六月", "七月", "八月", "九月", "十月", "十一月", "十二月"],
        isRTL: false,
        showButtonPanel: true,
        yearRange: "-85:+0"
        };
 
        //创建日期选择器
        $("#txtBirthday").datepicker(pickerOpts);
      });
       
</script>
 
</head>
<body onLoad="HideDiv()"> 
    <div style="color: #000000; width: 50px;height: 20px; background:#000000; "></div>
    <div style="color: #DD0000; width: 50px;height: 20px;background:#DD0000"></div>
    <div style="color: #FFCE00; width: 50px;height: 20px;background:#FFCE00"></div>
    <div id="dudialog" class="dudialog"  style="z-index: 9999; position: fixed ! important; right: 15px; top: 10px;">
       <a href="#" onClick="javascript:closeWin()">X</a>
    </div>
</body>
</html>

  

posted @   ®Geovin Du Dream Park™  阅读(240)  评论(0编辑  收藏  举报
编辑推荐:
· AI与.NET技术实操系列:基于图像分类模型对图像进行分类
· go语言实现终端里的倒计时
· 如何编写易于单元测试的代码
· 10年+ .NET Coder 心语,封装的思维:从隐藏、稳定开始理解其本质意义
· .NET Core 中如何实现缓存的预热?
阅读排行:
· 25岁的心里话
· 闲置电脑爆改个人服务器(超详细) #公网映射 #Vmware虚拟网络编辑器
· 基于 Docker 搭建 FRP 内网穿透开源项目(很简单哒)
· 零经验选手,Compose 一天开发一款小游戏!
· 一起来玩mcp_server_sqlite,让AI帮你做增删改查!!
< 2025年3月 >
23 24 25 26 27 28 1
2 3 4 5 6 7 8
9 10 11 12 13 14 15
16 17 18 19 20 21 22
23 24 25 26 27 28 29
30 31 1 2 3 4 5
点击右上角即可分享
微信分享提示