CSS Shadows all four sides of div

前端 未结 11 1542
青春惊慌失措
青春惊慌失措 2021-02-08 11:18

I want to achieve this in CSS - not CSS3 as I want it to be supported by all browsers

ie a div containing content, with the shadows on every side. The top area will be

11条回答
  •  忘了有多久
    2021-02-08 11:49

    You can do this with three divs, assuming they are all the same (fixed) width:

    Hello World!

    .top{ background:url('top.png'); height:20px; width:800px; } .middle{ background:url('middle.png') repeat-y; width:800px; } .bottom{ background:url('bottom.png'); height:20px; width:800px; }

提交回复
热议问题