摘要:
const ua: string = window.navigator.userAgent; const isWeixin: boolean = /MicroMessenger/i.test(ua); const isAndroid: boolean = /Android/i.test(ua); c 阅读全文
摘要:
左边固定宽度,右边自适应 浮动布局的方法 <section class="container homeSection" id="mainSection"> <div class="content-wrap"> 222 </div> <div class="rightSide"> 333 </div> 阅读全文
摘要:
前端常问的面试题,题目:假设高度一定,请写出三栏布局,左右宽度300px,中间自适应。 看到这里我希望你能停下来思考几分钟, 1分钟~2分钟~3分钟~4分钟~5分钟! 好了,那么你想出了几种答案呢? 下面提供这道题的五种解决方案: 首先要写好整个页面的布局(初始化等) <style> html * 阅读全文
摘要:
方法一:给html、body都设置100%的高度,确定body下内容设置min-height有效,然后设置主体部分min-height为100%,此时若没有header、footer则刚好完美占满全屏(参考《div绝对居中、宽高自适应、多栏宽度自适应》),但是有了这两个,只能另寻他路,由于高版本浏览 阅读全文