CSS Box-Shadow adds arbitrary white border to Div

前端 未结 3 1319
离开以前
离开以前 2021-01-14 18:56

I\'m adding a box shadow to an element containing an img and it\'s creating an arbitrary white border on the bottom of the element. No border is being applied via CSS (and I

3条回答
  •  时光说笑
    2021-01-14 19:30

    Either :

    1. Add a display:block; to your img.
    2. Define a line-height of 0px on your div.

    An image is an inline element, so there is space for text, leaving that line.

    Demo

提交回复
热议问题