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.异步执行机制