面试题总结

1.请列举html5,css3等新增属性,至少五个

https://www.cnblogs.com/olive987/p/5841688.html

2.写一段js代码,记录用户访问页面次数

        var sum=0;
        window.onfocus=function(){
            if(document.hasFocus()){
                sum++;
                console.log(sum);
            }
        }

3.完成左边固定宽度200px,高度自适应盒子,右边等高大盒子嵌套三个小盒子上中下宽度占满,上下分别100px高度,中间自适应,下盒子固定在底部

HTML:

    <div class="test">
        <div class="left">left</div>
        <div class="container">
            <div class="top">top</div>
            <div class="main">main</div>
            <div class="bottom">bottom</div>
        </div>
    </div>

CSS:

<style>
        *{
            margin:0;
            padding:0;
        }
        .test{
            width: 100%;
            height: 100%;
            background-color: blue;
            position: absolute;
        }
        .left{
            width: 200px;
            height:100%;
            float: left;
            background-color: green;
        }
        .container{
            box-sizing: border-box;
            padding: 100px 0 100px 200px; 
            background-color: red;
            height: 100%;
            width: 100%;
        }
        .top{
            width: 100%;
            height:100px;
            margin-top: -100px;
            background-color: aqua; 
        }
        .main{
            width: 100%;
            height: 100%;
        }
        .bottom{
            width: 100%;
            height:100px;
            background-color: aqua; 
        }
    </style>

示意图:

3.请写出匹配手机号的正则表达式

/^1(3|5|4|7|8)\d{9}$/

4.异步执行机制

https://blog.csdn.net/highboys/article/details/79110116

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

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值