Best way to size an element to the size of another element

后端 未结 2 1602
孤街浪徒
孤街浪徒 2021-01-23 17:46

I am using an old CSS trick to get a semi-transparent background for some content, without the content appearing semi-transparent. Here is the HMTL:

2条回答
  •  遇见更好的自我
    2021-01-23 17:56

    Try taking position: absolute off of the contentFrame but leaving it on the opacityFrame. That should cause it's parent to resize, and the opacityFrame to still overlay everything.

提交回复
热议问题