一、css 层级问题两个元素,现在B叠在A上,你想让A叠在B上,就设置了A的z-index大于B的。但你发现设置后B还是叠在A上,你觉得可能是哪些原因导致没有生效呢?z-index的元素position,没有设置为relative;二、布局题 3个子元素用 html+css 实现如下布局:父元素宽度未知,三个子元素默认间距30px, 但当父元素不够宽时,三个子元素的间距会自动缩小。<!DOCTYPE html><html><body><div class="parent">    <div class="child a">A</div>    <div class="item"></div>    <div class="child b">B</div>    <div class="item"></div>    <div class="child c">C</div></div></body><style>.parent{    background: grey;    width: 100%;    height: 200px;    display:flex;    justify-content:center;    align-items:center;}.child{    background: red;    width: 50px;    height: 50px;    justify-self:center;    flex-shrink:0}.item{ width:30px}</style></html>三、算法 大数组中移除小数组有两个数组,想要从大数组中移除最少数量的元素,使得两个数组不再有交集。返回改变后的大数组。例:大:[1, 3, 4, 2, 5, 6, 7, 8, 9]小:[13, 2, 3, 5, 7]结果:  [1, 4, 6, 8, 9]时间复杂度尽量低let arr = [1, 3, 4, 2, 5, 6, 7, 8, 9];let to_remove=[13, 2, 3, 5, 7];let res = [];arr.filter(item =>{    if(!to_remove.includes(item)){        res.push(item)    }})
点赞 15
评论 6
全部评论

相关推荐

2025-12-15 12:50
河北工程大学
sta666:我也是这个国际商业化的,三天,一天一面,就通过了,不过我是后端实习生,好好面感觉能过。
点赞 评论 收藏
分享
评论
点赞
收藏
分享

创作者周榜

更多
牛客网
牛客网在线编程
牛客网题解
牛客企业服务