微信公众号页面遇到的坑

<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}}

 

转载于:https://www.cnblogs.com/daikefeng/p/6971807.html

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值