码迷,mamicode.com
首页 > 微信 > 详细

微信公众号页面遇到的坑

时间:2017-06-09 15:12:56      阅读:263      评论:0      收藏:0      [点我收藏+]

标签:ssl   代码   border   width   nbsp   log   view   box   a标签   

<input type="checkbox">本身自带默认样式,需要把它去掉,代码如下:

input,button{border:none;outline:none;}
input[type="button"] {
display:none}//把checkbox的默认样式去掉

自己可以在上面加背景图之类的,一般我们给它前面加一个label标签,然后再给label添加样式,我用的是jquery来给它切换背景图片,先给它设置了一个默认的背景图,然后用toggleClassl来切换class,另一个背景图写在css样式表里面。

禁止缩放的meta标签:<meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0">。

用媒体查询设置html的font-size大小:

html{font-size:62.5%;}
body{font-size:1rem;font-family:"冬青黑体简体";}
@media screen and (min-width:800px){html{font-size:25px}}
@media screen and (min-width:750px) and (max-width:799px){html{font-size:23.5px}}
@media screen and (min-width:720px) and (max-width:749px){html{font-size:22.5px}}
@media screen and (min-width:640px) and (max-width:719px){html{font-size:20px}}
@media screen and (min-width:415px) and (max-width:639px){html{font-size:15px}}
@media screen and (min-width:376px) and (max-width:414px){html{font-size:12px}}
@media screen and (min-width:321px) and (max-width:375px){html{font-size:11px}}
@media screen and (max-width:320px) {html{font-size: 9px}}

 

微信公众号页面遇到的坑

标签:ssl   代码   border   width   nbsp   log   view   box   a标签   

原文地址:http://www.cnblogs.com/daikefeng/p/6971807.html

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!