I do not want to inherit the child opacity from the parent in CSS

前端 未结 14 901
猫巷女王i
猫巷女王i 2020-11-21 06:31

I do not want to inherit the child opacity from the parent in CSS.

I have one div which is the parent, and I have another div inside the first div which is the child

14条回答
  •  [愿得一人]
    2020-11-21 06:50

    On mac you can use Preview editor to apply opacity to a white rectangle laid over your .png image before you put it in your .css.

    1) Image
    Logo

    2) Create a rectangle around the image
    Rectanle around logo

    3) Change background color to white
    rectangle turned white

    4) Adjust rectangle opacity
    opaque image

提交回复
热议问题