我用flexbox创建了div,我需要做一个像图片中的悬停。
使用CSS box-shadow属性:
#[here is your element name]:hover { box-shadow: inset 0 0 10px #0000ff; }
您可以使用box-shadow和inset关键字:
box-shadow
inset
.element:hover { box-shadow: inset 0 0 10px #000000; }