当前位置:   article > 正文

基于layer mobile手机端弹出框,询问框(PC端推荐layer和artDialog:http://download.csdn.net/download/cometwo/9437895)_layer for mobile官网

layer for mobile官网

分享一下我老师大神的人工智能教程!零基础,通俗易懂!http://blog.csdn.net/jiangjunshow

也欢迎大家转载本篇文章。分享知识,造福人民,实现我们中华民族伟大复兴!

                       

layer mobile是为移动设备(手机、平板等webkit内核浏览器/webview)量身定做的弹层支撑,采用Native JavaScript编写,完全独立于PC版的layer,您需要按照场景选择使用。 官方地址:http://layer.layui.com/mobile/     下载地址:http://download.csdn.net/detail/cometwo/9441001

这里写图片描述
这里写图片描述

<!DOCTYPE html><html>    <head>        <meta charset="utf-8" />        <meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1, minimum-scale=1, user-scalable=no, minimal-ui">        <meta content="yes" name="apple-mobile-web-app-capable">        <meta content="black" name="apple-mobile-web-app-status-bar-style">        <meta content="telephone=no" name="format-detection">        <meta content="email=no" name="format-detection">        <meta http-equiv="refresh" content="100">        <title>手机</title>        <script type="text/javascript" src="js/jquery-2.1.0.min.js"></script>        <link rel="stylesheet" href="css/layer.css" />        <script type="text/javascript" src="js/fastclick.js"></script>        <script type="text/javascript" src="js/layer.js"></script>        <style type="text/css">            input {                width: auto;                padding: 10px;                line-height: 20px;                background: red;                border: 1px solid blue;                margin: 10px;            }        </style>        <script type="text/javascript">            FastClick.attach(document.body);            $(function() {                $('.btn1').click(function() {                    layer.open({                        content: '您好',                        anim: true,                        time: 2 //2秒后自动关闭                    });                });                $('.btn2').click(function() {                    layer.open({                        content: '通过style设置你想要的样式',                        style: 'background-color:#09C1FF; color:#fff; border:none;margin: 0px;',                        time: 2                    });                });                $('.btn3').click(function() {                    layer.open({                        title: [                            '我是标题',                            'background-color:#fff; color:#000;'                        ],                        cancel: function() {                            layer.open({                                content: '你点了x',                                time: 1                            });                        },                        btn: ['确认', '取消'],                        shadeClose: false, //默认:true,是否点击遮罩时关闭层                        yes: function() {                            layer.open({                                content: '你点了确认',                                time: 1                            });                        },                        no: function() {                            layer.open({                                content: '你选择了取消',                                time: 1                            });                        },                        content: '标题风格任你定义。。'                    });                });                $('.btn4').click(function() {                    layer.open({                        //                      title: [                        //                          '我是标题',                        //                          'background-color:#8DCE16; color:#fff;'                        //                      ],                        content: '通过style设置你想要的样式',                        btn: ['OK']                    });                });                $('.btn5').click(function() {                    layer.open({                        content: '你是想确认呢,还是想取消呢?你是想确认呢,还是想取消呢?你是想确认呢,还是想取消呢?',                        btn: ['确认', '取消'],                        shadeClose: false, //默认:true,是否点击遮罩时关闭层                        yes: function() {                            layer.open({                                content: '你点了确认',                                time: 1                            });                        },                        no: function() {                            layer.open({                                content: '你选择了取消',                                time: 1                            });                        }                    });                });                $('.btn6').click(function() {                    layer.open({                        title: '信息',                        content: '移动版和PC版不能同时使用在同一页面。'                    });                });                $('.btn7').click(function() {                    layer.open({                        title: '提示',                        content: '您确定要刷新一下本页面吗?',                        btn: ['嗯', '不要'],                        yes: function(index) {                            location.reload();                            layer.close(index);                        }                    });                });                $('.btn8').click(function() {                    layer.open({                        type: 1,                        content: '<img src="img/layer-mobile.png">'                    })                });                $('.btn9').click(function() {                    layer.open({                        type: 1,                        content: '可传入任何内容,支持html。一般用于手机页面中',                        anim: 0,                        style: 'position:fixed; bottom:0; left:0; width:100%; height:150px; padding:10px 30px; border:none;color:red'                    });                });                $('.btn10').click(function() {                    layer.open({                        type: 2                            //,shade: false                            ,                        time: 5                            //,content: '加载测试中…'                    });                });            })        </script>    </head>    <body>        <input type="button" class="btn1" value="弹出框1" />        <input type="button" class="btn2" value="弹出框2" />        <input type="button" class="btn3" value="弹出框3" />        <input type="button" class="btn4" value="弹出框4" />        <input type="button" class="btn5" value="弹出框5" />        <input type="button" class="btn6" value="信息框" />        <input type="button" class="btn7" value="询问框" />        <input type="button" class="btn8" value="二维码" />        <input type="button" class="btn9" value="页面层" />        <input type="button" class="btn10" value="加载条" />    </body></html><!DOCTYPE html><html>    <head>        <meta charset="utf-8" />        <meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1, minimum-scale=1, user-scalable=no, minimal-ui">        <meta content="yes" name="apple-mobile-web-app-capable">        <meta content="black" name="apple-mobile-web-app-status-bar-style">        <meta content="telephone=no" name="format-detection">        <meta content="email=no" name="format-detection">        <meta http-equiv="refresh" content="100">        <title>手机</title>        <script type="text/javascript" src="js/jquery-2.1.0.min.js"></script>        <link rel="stylesheet" href="css/layer.css" />        <script type="text/javascript" src="js/fastclick.js"></script>        <script type="text/javascript" src="js/layer.js"></script>        <style type="text/css">            input {                width: auto;                padding: 10px;                line-height: 20px;                background: red;                border: 1px solid blue;                margin: 10px;            }        </style>        <script type="text/javascript">            FastClick.attach(document.body);            $(function() {                $('.btn1').click(function() {                    layer.open({                        content: '您好',                        anim: true,                        time: 2 //2秒后自动关闭                    });                });                $('.btn2').click(function() {                    layer.open({                        content: '通过style设置你想要的样式',                        style: 'background-color:#09C1FF; color:#fff; border:none;margin: 0px;',                        time: 2                    });                });                $('.btn3').click(function() {                    layer.open({                        title: [                            '我是标题',                            'background-color:#fff; color:#000;'                        ],                        cancel: function() {                            layer.open({                                content: '你点了x',                                time: 1                            });                        },                        btn: ['确认', '取消'],                        shadeClose: false, //默认:true,是否点击遮罩时关闭层                        yes: function() {                            layer.open({                                content: '你点了确认',                                time: 1                            });                        },                        no: function() {                            layer.open({                                content: '你选择了取消',                                time: 1                            });                        },                        content: '标题风格任你定义。。'                    });                });                $('.btn4').click(function() {                    layer.open({                        //                      title: [                        //                          '我是标题',                        //                          'background-color:#8DCE16; color:#fff;'                        //                      ],                        content: '通过style设置你想要的样式',                        btn: ['OK']                    });                });                $('.btn5').click(function() {                    layer.open({                        content: '你是想确认呢,还是想取消呢?你是想确认呢,还是想取消呢?你是想确认呢,还是想取消呢?',                        btn: ['确认', '取消'],                        shadeClose: false, //默认:true,是否点击遮罩时关闭层                        yes: function() {                            layer.open({                                content: '你点了确认',                                time: 1                            });                        },                        no: function() {                            layer.open({                                content: '你选择了取消',                                time: 1                            });                        }                    });                });                $('.btn6').click(function() {                    layer.open({                        title: '信息',                        content: '移动版和PC版不能同时使用在同一页面。'                    });                });                $('.btn7').click(function() {                    layer.open({                        title: '提示',                        content: '您确定要刷新一下本页面吗?',                        btn: ['嗯', '不要'],                        yes: function(index) {                            location.reload();                            layer.close(index);                        }                    });                });                $('.btn8').click(function() {                    layer.open({                        type: 1,                        content: '<img src="img/layer-mobile.png">'                    })                });                $('.btn9').click(function() {                    layer.open({                        type: 1,                        content: '可传入任何内容,支持html。一般用于手机页面中',                        anim: 0,                        style: 'position:fixed; bottom:0; left:0; width:100%; height:150px; padding:10px 30px; border:none;color:red'                    });                });                $('.btn10').click(function() {                    layer.open({                        type: 2                            //,shade: false                            ,                        time: 5                            //,content: '加载测试中…'                    });                });            })        </script>    </head>    <body>        <input type="button" class="btn1" value="弹出框1" />        <input type="button" class="btn2" value="弹出框2" />        <input type="button" class="btn3" value="弹出框3" />        <input type="button" class="btn4" value="弹出框4" />        <input type="button" class="btn5" value="弹出框5" />        <input type="button" class="btn6" value="信息框" />        <input type="button" class="btn7" value="询问框" />        <input type="button" class="btn8" value="二维码" />        <input type="button" class="btn9" value="页面层" />        <input type="button" class="btn10" value="加载条" />    </body></html>
  
  
  • 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
  • 1
           

给我老师的人工智能教程打call!http://blog.csdn.net/jiangjunshow
这里写图片描述
声明:本文内容由网友自发贡献,不代表【wpsshop博客】立场,版权归原作者所有,本站不承担相应法律责任。如您发现有侵权的内容,请联系我们。转载请注明出处:https://www.wpsshop.cn/w/繁依Fanyi0/article/detail/93338
推荐阅读
相关标签
  

闽ICP备14008679号