Non transparent div inside a transparent div

后端 未结 4 1229
梦毁少年i
梦毁少年i 2021-01-08 01:09

I am creating a webpage that have a transparent div.

I want to add a non-transparent div inside that transparent div and I find that it is also transparent.

4条回答
  •  粉色の甜心
    2021-01-08 01:50

    There are two ways that I know of to work around this:

    • Fake transparency on the containing div by using a transparent PNG as the background image.
    • Separate the divs so that they are side-by-side, and then use relative or absolute positioning to stack them.

提交回复
热议问题