<!DOCTYPE html> <html> <head> <meta charset="UTF-8"> <!-- 注意事项: 1,根据官网定义X-UA-compatible 标头不区分大小写;不过,它必须显示在网页中除 title 元素和其他 meta 元素以外的所有其他元素之前。如果不是的话,它不起作用 2,content的内容是IE=8,或者IE=edge等值,注意不是IE8或者直接写个edge的值,否则不起作用 <!-- Set render engine for 360 browser --> <meta name="renderer" content="webkit"> <meta http-equiv = "X-UA-Compatible" content = "IE=Edge,chrome=1" > # 以上代码IE = edge告诉IE使用最新的引擎渲染网页,chrome = 1则可以激活Chrome Frame . width=device-width:让文档的宽度与设备的宽度保持一致,且文档最大的宽度比例是1.0 initial-scale=1:初始的缩放比例 maximum-scale=1:允许用户缩放到的最大比例(对应还有个minimum-scale) user-scalable=no:不允许用户手动缩放 --> <meta name="viewport" content="width=device-width,initial-scale=1,maximum-scale=1,user-scalable=no" /> <!-- telephone=no:禁止自动将页面中的数字识别为电话号码 address=no:禁止自动地址转为链接 email=no:禁止自动将email转为链接 --> <meta name="format-detection" content="telephone=no,address=no,email=no" /> <!-- 强制将页面布局为一列 --> <meta name="mobileOptimized" content="width" /> <!-- 申明页面是移动友好的 --> <meta name="handheldFriendly" content="true" /> <!-- 允许用户使用全屏模式浏览 --> <meta name="apple-mobile-web-app-capable" content="yes" /> <!-- 当用户使用全屏浏览时,将状态条设置为黑色 --> <meta name="apple-mobile-web-app-status-bar-style" content="black" /> <meta http-equiv="Cache-Control" content="max-age=60"/> <!--<meta http-equiv="pragma" content="no-cache">,pragma与no-cache用于定义页面缓存,不缓存页面(为了提高速度一些浏览器会缓存浏览者浏览过的页面,通过下面的定义,浏览器一般不会缓存页面,而且浏览器无法脱机浏览.) <meta http-equiv="cache-control" content="no-cache">,常见的取值有private、no-cache、max-age、must-revalidate等,默认为private,其作用根据不同的重新浏览方式分为以下几种情况: 1) 打开新窗口 值为private、no-cache、must-revalidate,那么打开新窗口访问时都会重新访问服务器。 而如果指定了max-age值,那么在此值内的时间里就不会重新访问服务器,例如: Cache-control: max-age=5(表示当访问此网页后的5秒内再次访问不会去服务器) 2) 在地址栏回车 值为private或must-revalidate则只有第一次访问时会访问服务器,以后就不再访问。 值为no-cache,那么每次都会访问。 值为max-age,则在过期之前不会重复访问。 3) 按后退按扭 值为private、must-revalidate、max-age,则不会重访问, 值为no-cache,则每次都重复访问 4) 按刷新按扭 无论为何值,都会重复访问 Cache-control值为“no-cache”时,访问此页面不会在Internet临时文件夹留下页面备份。 <meta http-equiv="expires" content="0"> ,指定Expires值为一个早已过去的时间,那么访问此网时若重复在地址栏按回车,那么每次都会重复访问: Expires: Fri, 31 Dec 1999 16:00:00 GMT 比如:禁止页面在IE中缓存 http响应消息头部设置: CacheControl = no-cache Pragma=no-cache Expires = -1 Expires是个好东东,如果服务器上的网页经常变化,就把它设置为0,表示立即过期。 --> <link rel="apple-touch-icon-precomposed" href=# > <link rel="apple-touch-startup-image" href=#> <link rel="stylesheet" href="your_css_url" /> <meta name="viewport" content="width=device-width, initial-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 name="format-detection" content="telephone=no, email=no" /> <title>手机页面模板</title> <style id="jsbin-css"> /** * 1. Set default font family to sans-serif. * 2. Prevent iOS text size adjust after orientation change, without disabling * user zoom. * 0. sandal's style */ html { font-family: sans-serif; -ms-text-size-adjust: 100%; -webkit-text-size-adjust: 100%; font-size: 62.5%; } /** * 1. Remove default margin * 0. sandal's style. */ body { margin: 0; font-size: 1.4rem; line-height: 1.5; color: #333333; background-color: white; height: 100%; overflow-x: hidden; -webkit-overflow-scrolling: touch; } /* HTML5 display definitions ========================================================================== */ /** * Correct `block` display not defined for any HTML5 element in IE 8/9. * Correct `block` display not defined for `details` or `summary` in IE 10/11 and Firefox. * Correct `block` display not defined for `main` in IE 11. */ article, aside, details, figcaption, figure, footer, header, hgroup, main, nav, section, summary { display: block; } /** * 1. Correct `inline-block` display not defined in IE 8/9. * 2. Normalize vertical alignment of `progress` in Chrome, Firefox, and Opera. */ audio, canvas, progress, video { display: inline-block; vertical-align: baseline; } /** * Prevent modern browsers from displaying `audio` without controls. * Remove excess height in iOS 5 devices. */ audio:not([controls]) { display: none; height: 0; } /** * Address `[hidden]` styling not present in IE 8/9/10. * Hide the `template` element in IE 8/9/11, Safari, and Firefox < 22. */ [hidden], template { display: none; } /* Links ========================================================================== */ /** * 1. Remove the gray background color from active links in IE 10. * 2. Improve readability when focused and also mouse hovered in all browsers. * 0. sandal's style. */ a { background: transparent; text-decoration: none; -webkit-tap-highlight-color: transparent; color: #0088cc; } a:active { outline: 0; } a:active { color: #006699; } /* Text-level semantics ========================================================================== */ /** * Address styling not present in IE 8/9/10/11, Safari, and Chrome. */ abbr[title] { border-bottom: 1px dotted; } /** * Address style set to `bolder` in Firefox 4+, Safari, and Chrome. */ b, strong { font-weight: bold; } /** * Address styling not present in Safari and Chrome. */ dfn { font-style: italic; } /** * Address styling not present in IE 8/9. */ mark { background: #ff0; color: #000; } /** * Address inconsistent and variable font size in all browsers. */ small { font-size: 80%; } /** * Prevent `sub` and `sup` affecting `line-height` in all browsers. */ sub, sup { font-size: 75%; line-height: 0; position: relative; vertical-align: baseline; } sup { top: -0.5em; } sub { bottom: -0.25em; } /* Embedded content ========================================================================== */ /** * 1. Remove border when inside `a` element in IE 8/9/10. * 2. Improve image quality when scaled in IE 7. * 0. sandal's style. */ img { border: 0; vertical-align: middle; } /** * Correct overflow not hidden in IE 9/10/11. */ svg:not(:root) { overflow: hidden; } /* Grouping content ========================================================================== */ /** * Address differences between Firefox and other browsers. */ hr { -moz-box-sizing: content-box; box-sizing: content-box; height: 0; } /** * 1. Contain overflow in all browsers. * 2. Improve readability of pre-formatted text in all browsers. */ pre { overflow: auto; white-space: pre; white-space: pre-wrap; word-wrap: break-word; } /** * 1. Address odd `em`-unit font size rendering in all browsers. */ code, kbd, pre, samp { font-family: monospace, monospace; font-size: 1em; } /* Forms ========================================================================== */ /** * Known limitation: by default, Chrome and Safari on OS X allow very limited * styling of `select`, unless a `border` property is set. */ /** * 1. Correct color not being inherited. * Known issue: affects color of disabled elements. * 2. Correct font properties not being inherited. * 3. Address margins set differently in Firefox 4+, Safari, and Chrome. */ button, input, optgroup, select, textarea { color: inherit; font: inherit; margin: 0; } /** * Address `overflow` set to `hidden` in IE 8/9/10/11. */ button { overflow: visible; } /** * Address inconsistent `text-transform` inheritance for `button` and `select`. * All other form control elements do not inherit `text-transform` values. * Correct `button` style inheritance in Firefox, IE 8/9/10/11, and Opera. * Correct `select` style inheritance in Firefox. */ button, select { text-transform: none; } /** * 1. Avoid the WebKit bug in Android 4.0.* where (2) destroys native `audio` * and `video` controls. * 2. Correct inability to style clickable `input` types in iOS. * 3. Improve usability and consistency of cursor style between image-type * `input` and others. */ button, html input[type="button"], input[type="reset"], input[type="submit"] { -webkit-appearance: button; cursor: pointer; } /** * Re-set default cursor for disabled elements. */ button[disabled], html input[disabled] { cursor: default; } /** * Remove inner padding and border in Firefox 4+. */ button::-moz-focus-inner, input::-moz-focus-inner { border: 0; padding: 0; } /** * Address Firefox 4+ setting `line-height` on `input` using `!important` in * the UA stylesheet. */ input { line-height: normal; } /** * It's recommended that you don't attempt to style these elements. * Firefox's implementation doesn't respect box-sizing, padding, or width. * * 1. Address box sizing set to `content-box` in IE 8/9/10. * 2. Remove excess padding in IE 8/9/10. */ input[type="checkbox"], input[type="radio"] { box-sizing: border-box; padding: 0; } /** * Fix the cursor style for Chrome's increment/decrement buttons. For certain * `font-size` values of the `input`, it causes the cursor style of the * decrement button to change from `default` to `text`. */ input[type="number"]::-webkit-inner-spin-button, input[type="number"]::-webkit-outer-spin-button { height: auto; } /** * 1. Address `appearance` set to `searchfield` in Safari and Chrome. * 2. Address `box-sizing` set to `border-box` in Safari and Chrome * (include `-moz` to future-proof). */ input[type="search"] { -webkit-appearance: textfield; -moz-box-sizing: border-box; -webkit-box-sizing: border-box; box-sizing: border-box; } /** * Remove inner padding and search cancel button in Safari and Chrome on OS X. * Safari (but not Chrome) clips the cancel button when the search input has * padding (and `textfield` appearance). */ input[type="search"]::-webkit-search-cancel-button, input[type="search"]::-webkit-search-decoration { -webkit-appearance: none; } /** * Define consistent border, margin, and padding. */ fieldset { border: 1px solid #c0c0c0; margin: 0 2px; padding: 0.35em 0.625em 0.75em; } /** * 1. Correct `color` not being inherited in IE 8/9/10/11. * 2. Remove padding so people aren't caught out if they zero out fieldsets. */ legend { border: 0; padding: 0; } /** * 1. Remove default vertical scrollbar in IE 8/9/10/11. * 0. sandal's style */ textarea { overflow: auto; resize: vertical; } /** * Don't inherit the `font-weight` (applied by a rule above). * NOTE: the default cannot safely be changed in Chrome and Safari on OS X. */ optgroup { font-weight: bold; } /* Tables ========================================================================== */ /** * Remove most spacing between table cells. */ table { border-collapse: collapse; border-spacing: 0; } td, th { padding: 0; } html, button, input, select, textarea { font-family: "Helvetica Neue", Helvetica, STHeiTi, Arial, sans-serif; } h1, h2, h3, h4, h5, h6, p, figure, form, blockquote { margin: 0; } ul, ol, li, dl, dd { margin: 0; padding: 0; } ul, ol { list-style: none outside none; } h1, h2, h3 { line-height: 2; font-weight: normal; } h1 { font-size: 1.8rem; } h2 { font-size: 1.6rem; } h3 { font-size: 1.4rem; } input:-moz-placeholder, textarea:-moz-placeholder { color: #cccccc; } input::-moz-placeholder, textarea::-moz-placeholder { color: #cccccc; } input:-ms-input-placeholder, textarea:-ms-input-placeholder { color: #cccccc; } input::-webkit-input-placeholder, textarea::-webkit-input-placeholder { color: #cccccc; } * { -webkit-box-sizing: border-box; -moz-box-sizing: border-box; box-sizing: border-box; } @font-face { font-family: icomoon; font-weight: normal; font-style: normal; src=\'#\'" /fonts/icomoon.eot"); src=\'#\'" /fonts/icomoon.eot?#iefix") format("eot"), url("../fonts/icomoon.svg#icomoon") format("svg"), url("../fonts/icomoon.woff") format("woff"), url("../fonts/icomoon.ttf") format("truetype"); } .if-wifi::before, .if-comment::before, .if-user::before, .if-map::before, .if-cart::before, .if-date::before, .if-music::before, .if-home::before, .if-image::before, .if-video::before, .if-tags::before, .if-qrcode::before, .if-forward::before, .if-back::before, .if-loading::before, .if-refresh::before, .if-search::before, .if-con::before, .if-gift::before, .if-trashcan::before, .if-logout::before, .if-files::before, .if-question::before, .if-info::before, .if-alert::before, .if-arrow-up::before, .if-arrow-right::before, .if-arrow-down::before, .if-arrow-left::before, .if-checkbox-checked::before, .if-checkbox::before, .if-radio-checked::before, .if-radio::before, .if-mail::before, .if-heart::before, .if-star::before, .if-voice::before, .if-voice-no::before, .if-ellipsis::before, .if-pencil::before, .if-list::before, .if-lock::before, .if-phone::before, .if-target::before, .if-card::before, .if-checkmark::before, .if-cross::before, .if-plus::before, .if-minus::before, .if-angle-up::before, .if-angle-right::before, .if-angle-down::before, .if-angle-left::before { display: inline-block; vertical-align: -2px; font-family: icomoon; font-size: 1.6rem; line-height: 1; speak: none; font-style: normal; font-weight: normal; font-variant: normal; text-transform: none; -webkit-font-smoothing: antialiased; -moz-osx-font-smoothing: grayscale; } .if-wifi::before { content: "\e62f"; } .if-comment::before { content: "\e601"; } .if-user::before { content: "\e632"; } .if-map::before { content: "\e61b"; } .if-cart::before { content: "\e606"; } .if-date::before { content: "\e607"; } .if-music::before { content: "\e60f"; } .if-home::before { content: "\e600"; } .if-image::before { content: "\e602"; } .if-video::before { content: "\e61d"; } .if-tags::before { content: "\e61f"; } .if-qrcode::before { content: "\e605"; } .if-forward::before { content: "\e608"; } .if-back::before { content: "\e609"; } .if-loading::before { content: "\e60a"; } .if-refresh::before { content: "\e60b"; } .if-search::before { content: "\e60c"; } .if-con::before { content: "\e60e"; } .if-gift::before { content: "\e620"; } .if-trashcan::before { content: "\e621"; } .if-logout::before { content: "\e622"; } .if-files::before { content: "\e624"; } .if-question::before { content: "\e616"; } .if-info::before { content: "\e617"; } .if-alert::before { content: "\e60d"; } .if-arrow-up::before { content: "\e604"; } .if-arrow-right::before { content: "\e623"; } .if-arrow-down::before { content: "\e611"; } .if-arrow-left::before { content: "\e612"; } .if-checkbox-checked::before { content: "\e625"; } .if-checkbox::before { content: "\e626"; } .if-radio-checked::before { content: "\e627"; } .if-radio::before { content: "\e628"; } .if-mail::before { content: "\f003"; } .if-heart::before { content: "\f08a"; } .if-star::before { content: "\f006"; } .if-voice::before { content: "\f130"; } .if-voice-no::before { content: "\f131"; } .if-ellipsis::before { content: "\f142"; } .if-pencil::before { content: "\e61c"; } .if-list::before { content: "\e61e"; } .if-lock::before { content: "\e62c"; } .if-phone::before { content: "\e610"; } .if-target::before { content: "\e603"; } .if-card::before { content: "\e613"; } .if-checkmark::before { content: "\e614"; } .if-cross::before { content: "\e615"; } .if-plus::before { content: "\e619"; } .if-minus::before { content: "\e618"; } .if-angle-up::before { content: "\e636"; } .if-angle-right::before { content: "\e62a"; } .if-angle-down::before { content: "\e629"; } .if-angle-left::before { content: "\e61a"; } html, body, .wrap-page { height: 100%; } .fixed-top { position: fixed; left: 0; right: 0; top: 0; z-index: 960; } .fixed-bottom { position: fixed; left: 0; right: 0; bottom: 0; z-index: 940; } .header, .footer { height: 44px; } .header-sub { position: fixed; left: 0; right: 0; top: 44px; height:44px; } .header + .wrap-page { padding-top: 44px; } .header + .header-sub + .wrap-page { padding-top: 88px; } .footer + .wrap-page > .page { padding-bottom: 44px; } .header + .footer + .wrap-page { padding-top: 44px; } .header-sub + .footer + .wrap-page { padding-top: 88px; } .overlay { z-index: 980; position: absolute; top: 0; right: 0; bottom: 0; left: 0; background-color: rgba(0, 0, 0, 0.8); -webkit-box-pack: center; -ms-flex-pack: center; -webkit-justify-content: center; justify-content: center; -webkit-box-align: center; -ms-flex-align: center; -webkit-align-items: center; align-items: center; } .fl { float: left; } .fr { float: right; } input:focus { outline: 0 none; } .header, .footer { background: #0078e7; color: #fff; text-align: center; } .header { line-height: 44px; } .header .page-title { font-size: 18px; margin-left: 50px; margin-right: 50px; line-height: 44px; } .header .page-title--tabs { margin-top: 5px; margin-bottom: 5px; display: inline-block; border: 1px solid #005eb4; border-radius: 5px; line-height: 32px; } .header .page-title--tabs span { padding: 0 10px; display: inline-block; background-color: #fff; color: #0078e7; } .header .page-title--tabs span.active { background-color: #0078e7; color: #fff; } .header .page-title--tabs span:first-child { border-radius: 5px 0 0 5px; } .header .page-title--tabs span:last-child { border-radius: 0 5px 5px 0; } .header .header-icon { color: #fff; width: 44px; height: 44px; background-color: #006bce; } .icon-back::before { content: ""; display: inline-block; display: inline-block; width: 10px; height: 10px; vertical-align: middle; border-left: 1px solid white; border-bottom: 1px solid white; -webkit-transform: rotate(45deg); transform: rotate(45deg); } .icon-label-orange { border: 1px solid #FF9A14; color: #FF9A14; font-size: 12px; padding: 2px; font-style: normal; line-height: 1; } .icon-toggle { height: 28px; width: 56px; position: relative; display: block; background-color: #CCCCCC; border-radius: 12px; overflow: hidden; z-index: 1; } .icon-toggle::before { content: ""; height: 28px; width: 56px; position: absolute; left: -56px; background-color: #099FDE; border-radius: 14px; transition: left 0.2s ease 0s; z-index: 2; } .icon-toggle.active::before { left: 0; } .icon-toggle::after { content: ""; height: 24px; width: 24px; background-color: #fff; border-radius: 14px; position: absolute; left: 2px; top: 2px; transition: left 0.2s ease 0s; z-index: 3; } .icon-toggle.active::after { left: 30px; } .header-sub { background-color: #fff; z-index:940; } .search-block { border-bottom: 1px solid #cccccc; padding: 5px 10px; position: relative; } .search-block .form-text { border-radius: 15px; border: 1px solid #cccccc; padding: 4px 30px 4px 10px; height: 30px; width: 100%; } .search-block .if-search { position: absolute; color: #cccccc; right: 10px; top: 5px; width: 30px; height: 30px; line-height: 30px; text-align: center; } .search-block .if-search:before { font-size: 20px; } .guide-title { padding-left: 10px; color: #0078e7; } .nav-primary li { -webkit-box-flex: 1; -ms-flex: 1; -webkit-flex: 1; flex: 1; text-align: center; line-height: 44px; color: #fff; } .nav-primary li a { color: #fff; display: block; } .nav-primary li i[class^="if-"] { display: block; } .nav-primary--mix li { line-height: 22px; } .box-group { margin-bottom: 20px; border: 1px solid #cccccc; background-color: #fff; border-radius: 5px; } .box-group > div:first-child, .box-group > li:first-child { border-top: none; border-radius: 5px 5px 0 0; } .box-group > div:last-child, .box-group > li:last-child { border-bottom: none; border-radius: 0 0 5px 5px; } .line-list { margin-bottom: 10px; } .line-list li { border-bottom: 1px solid #cccccc; background-color: #fff; line-height: 32px; padding: 5px 10px; position: relative; } .line-list li:first-child { border-top: 1px solid #cccccc; } .line-list li:active, .line-list li:hover { background-color: whitesmoke; } .line-list li .title { line-height: 1.3; margin-bottom: 4px; } .line-list li .intro { line-height: 1.3; font-size: 1.2rem; } .line-list li i[class^="if-"] { margin-right: 10px; } .line-list .divider { padding-left: 10px; line-height: 22px; font-weight: bold; background-color: whitesmoke; } .wrap-page{ -webkit-overflow-scrolling: touch; } </style> </head> <body> <header id="header" class="header fixed-top"> <a href="#" class="fl header-icon icon-back"></a> <h1 class="page-title">标题栏</h1> </header> <section class="header-sub"> <div class="search-block"> <input type="search" class="form-text"> </div> </section> <section id="footer" class="footer fixed-bottom"> <ul class="nav-primary"> <li><a href="#">Home</a></li> <li><a href="#">List</a></li> <li><a href="#">Demo</a></li> <li><a href="#">Download</a></li> </ul> </section> <div id="main" class="wrap-page"> <section class="page"> <ul class="line-list"> <li>15932921969</li> <li>[email protected]</li> <li>北京</li> <li>上海</li> <li>广州</li> <li class="divider">Divider</li> <li>深圳</li> <li>北京</li> <li>上海</li> <li>广州</li> <li class="divider">Divider</li> <li>深圳</li> <li>北京</li> <li>上海</li> <li>广州</li> <li class="divider">Divider</li> <li>深圳</li> <li>北京</li> <li>上海</li> <li>广州</li> <li class="divider">Divider</li> <li>深圳</li> <li>北京</li> <li>上海</li> <li>广州</li> <li class="divider">Divider</li> <li>深圳</li> <li>北京</li> <li>上海</li> <li>广州</li> <li class="divider">Divider</li> <li>深圳</li> <li>北京</li> <li>上海</li> <li>广州</li> </ul> </section> </div> </body> </html>