UNPKG

hg-citypicker

Version:

a citypicker in the mobile terminal

82 lines (72 loc) 1.9 kB
<!DOCTYPE html> <html lang="en"> <head> <meta charset="UTF-8"> <meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=no" /> <meta name="format-detection" content="telephone=no" /> <meta name="screen-orientation" content="portrait" /> <title>hg-citypicker</title> <link rel="shortcut icon" href="http://olislpb6q.bkt.clouddn.com/hg-head.png" /> <style> * { padding: 0; margin: 0; } body { background-color: #fff; } .wraper { margin-bottom: 15px; } .title { position: relative; width: 100%; height: 48px; line-height: 48px; text-align: center; color: #000; } .title:after { content: ''; position: absolute; width: 100px; height: 5px; left: 48%; bottom: 0; margin: 0 -42px; background: #bbb; border-radius: 10px; } .inputDiv { color: #333; width: 200px; height: 20px; line-height: 20px; margin: 10px auto; padding: 5px 20px; border: 1px solid #bbb; border-radius: 8px; } .btn-box { text-align: center; } .btn { line-height: 20px; padding:0 3px; border: 1px solid #000; } </style> </head> <body> <article class="wraper"> <h3 class="title">cityPicker1</h3> <div onclick="select(1)" class="inputDiv" id="city-input1">选择中国城市</div> <h3 class="title">cityPicker2</h3> <div onclick="select(2)" class="inputDiv" id="city-input2">选择中国城市</div> <div class="btn-box"> <button class="btn" onclick="setInitailOption()">设置初始显示</button> </div> </article> <script src="../city.js"></script> </body> </html>