html
`
`
css
`
.flex {
background-color: red;
height: 100%;
width: 100%;
display: flex;
}
.item {
background-color: yellow;
width: 25%;
height: 50%;
}
.item1 {
background-color: black;
width: 25%;
height: 50%;
}
.item2 {
background-color: blueviolet;
width: 25%;
height: 50%;
}
.item3 {
background-color: cornflowerblue;
width: 25%;
height: 50%;
}
`
给items添加一个点击事件 让他消失 剩下的几个Item自动填充剩下的宽度
`
$(".item3").click(function () {
console.log(123);
$(this).hide();
})
`
纯CSS的话 在布局的时候如何实现