Can a background image be larger than the div itself?

前端 未结 9 1289
天命终不由人
天命终不由人 2020-12-12 20:37

I have a footer div with 100% width. It\'s about 50px high, depending on its content.

Is it possible to give that #footer a background image that kind of overflows t

9条回答
  •  天涯浪人
    2020-12-12 20:51

    You can use a css3 psuedo element (:before and/or :after) as shown in this article

    https://www.exratione.com/2011/09/how-to-overflow-a-background-image-using-css3/

    Good Luck...

提交回复
热议问题