腾讯
- web安全了解多少?
- http与https有什么区别,为什么https更安全?
- HTTP2与http的区别,为什么http2更快?
- JavaScript事件循环机制
- javascript多线程的解决方案 worker 是什么,原理是啥?
- 前端监控如何实现?
- 微信小程序的底层原理是什么,为什么比原生的h5要更快?
- es6里的 Set 和 Map 类型的作用
- 谈谈你对pwa(渐进式web应用的)理解
哈罗单车
- 虚拟dom实现的元素
- react-dom diff算法原理和如何优化
- webpack速度优化、体积优化
- splitChunks 分片原理
商汤
- 用css实现左侧固定宽度,右侧余下的部分2等分,有几种写几种
<div class="box">
<div class="left"></div>
<div class="center"></div>
<div class="right"></div>
</div>
第一种: flex 写法, 设置box为flex布局,left为100px固定宽度,center和right均设为flex为1
.box {
display:flex;
width: 400px;
height: 100px;
}
.box .left{
width: 100px;
}
.box .center, box .right {
flex: 1;
}
第二种:利用float布局
.box {
width: 400px;
height: 100px;
}
.box .left {
float: left;
width: 100px;
height: 100%;
}
.box .center, box .right {
float: left;
height: 100%;
width: calc((100% - 100px)/2);
background: yellow;
}