2018年11月2日

移动端根元素(html)的设置

摘要: 1、通过js设置 <script> document.documentElement.style.fontSize = document.documentElement.clientWidth / 7.5 * 2 + 'px';//获取手机屏幕的宽度</script> 2.通过css设置时,设置根元 阅读全文

posted @ 2018-11-02 17:09 婧星 阅读(1683) 评论(0) 推荐(0) 编辑

移动端设备尺寸

摘要: <meta name="viewport" content="width=device-width, user-scalable=no, initial-scale=1.0, maximum-scale=1.0, minimum-scale=1.0, minimal-ui">minimal-ui,用 阅读全文

posted @ 2018-11-02 17:03 婧星 阅读(192) 评论(0) 推荐(0) 编辑

点击时出现某个样式,1s后移除该样式的案例效果

摘要: 这里为了使效果更好的让用户体现出来,点击时添加的样式为background:yellow;1后移除该样式: 案例demo为: 运行结果: 点击前: 点击后,1s后变为蓝色: 思路: 1.定义bgshow()函数,在函数中,先执行要的类名,通过setTimeOut 1s后移除该类名 2.在点击事件中调 阅读全文

posted @ 2018-11-02 16:45 婧星 阅读(514) 评论(0) 推荐(0) 编辑

导航