跟小D每日学口语

页面自适应纯CSS,使用rem单位

/* 全局样式 */
html, body, ul, li, ol, dl, dd, dt, h1, h2, h3, h4, h5, h6, p, form, fieldset, legend, img, input{margin:0; padding:0;}
h1, h2, h3, h4, h5, h6{text-align:center;font-size:100%;}
table{border-collapse:collapse;border-spacing:0;}
input{outline:none;font-size:100%; border:none; background:none; font-family:"Microsoft YaHei";}
img{max-width:100%;vertical-align:top;}
em,i{font-style:normal;}
ul,li,ol{list-style:none;}
body{font-family:Microsoft Yahei,tahoma,Srial,helvetica,sans-serif; -webkit-text-size-adjust:100%; font-size:12px;}
html{font-size:15.625vw;}
@media screen and (min-width:640px){
html{font-size:100px;}
}
a,a:hover{outline:none;text-decoration:none;}



例如:

{width:100%; text-align:center; padding:0.1rem 0 0.2rem; font-size:0.22rem; color:#fff; overflow:hidden;}

  

posted @ 2019-07-18 11:32  明仔¥  阅读(246)  评论(0编辑  收藏  举报