How can I make my website's background transparent without making the content (images & text) transparent too?

前端 未结 8 1384
小鲜肉
小鲜肉 2020-12-15 04:25

I\'m doing a website for a school project, and I\'m currently having a small problem... I can\'t make the body\'s background transparent without it also affecting the conten

8条回答
  •  不知归路
    2020-12-15 05:26

    I would agree with @evillinux, It would be best to make your background image semi transparent so it supports < ie8

    The other suggestions of using another div are also a great option, and it's the way to go if you want to do this in css. For example if the site had such features as selecting your own background color. I would suggest using a filter for older IE. eg:

    filter:Alpha(opacity=50)
    

提交回复
热议问题