H5模板

--->html内容:



    
    
    
    
    
    
    
    
    
    
    标题
    
         
    
               
    
    
    
    
    




 



--->JS内容:
rem转换文件
(function(){
    var currClientWidth, fontValue, originWidth = 720;

    function __resize() {
        currClientWidth = document.documentElement.clientWidth;
        if (currClientWidth > 768) currClientWidth = 768;
        if (currClientWidth < 320) currClientWidth = 320;
        fontValue = ((625 * currClientWidth) / originWidth).toFixed(2);
        document.documentElement.style.fontSize = fontValue + '%';
    }
    __resize();
    
    window.addEventListener('resize', __resize, false);
})();
--->CSS内容:
初始化样式文件
@charset "utf-8";

/* 改变盒子模型渲染方式 */
* { box-sizing: border-box; }

/* 清除边距 */
html, body, div, h1, h2, h3, h4, h5, h6, ul, ol, dl, li, dt, dd, p, blockquote, pre, form, fieldset, table, th, td, span, input, textarea {
    margin: 0;
    padding: 0;
}

/* 清除列表默认样式 */
li, ol { list-style: none; }

/* 斜体扶正 */
i, em { font-style: normal; }

/* 清除链接下划线 */
a { text-decoration: none; }

/*移除表单及按钮原生样式*/
input, textarea, select { -webkit-appearance: none; }
input:focus, textarea:focus, select:focus { outline: none; }

/*禁用Webkit内核浏览器的文字大小调整功能、禁用ios点击元素高亮*/
html {
    font-family: 'microsoft yahei';
    -webkit-text-size-adjust: none; 
    -webkit-tap-highlight-color: rgba(0,0,0,0);
}
.clear-fix:after{ content:' '; display:block; height:0; clear:both; visibility:hidden }

注意事项:

模板链接(密码:qmw4)

你可能感兴趣的:(H5模板)