当将鼠标悬停在一个块上时,我希望它从各个方面都突出显示,但这不起作用,因为相邻的块叠加在突出显示上(在下图和左侧的图片中)。

#square {
width: 100px;
height: 100px;
float: left;
background-color: red;
}
#square:hover {
box-shadow: 0px 0px 10px #F0FFF0;
}
#workspace {
width: 800px;
height: 1200px;
background-color: white;
margin-left: auto;
margin-right: auto;
margin-top: 20px;
}
<div id="workspace">
<div id="square"></div>
<div id="square"></div>
<div id="square"></div>
...
<div id="square"></div>
<div id="square"></div>
</div>
添加:
PS:不好用我的id,还是上课比较好。
例子