so i have a little problem with css
i want to set transparent color with properties like a solid color
a solid black color on, for example: on 50% of a div with a text, the text disappears and it paints 50% black, well I would like to achieve the same but with the transparent color
What I mean by the text disappearing is that I am using the pseudo css element ::after
Here an image of i want:
Another way to say this, is, If my inset property covers 50% of my div, ok delete that 50% or make it transparent
if you still dont understand, feel free to ask!
thanks!
2
Answers
I think you’re trying to make an element like a switch div that changes color between black and transparent on state change. you can put 2 divs inside the div and change the color of each separately even if you are trying to make the black color seems to be moving between the divs you can make 2 linear gradient moving to the side.
Hope this Helps 🙂
Can you explain the style you want in a bit more detail? ( try using AI for translation if you have problem in describing it in english )
only part I understand right now is that you want a setting portion of div has black color and other half is transparent which can be achieved as follows
Pay main attention to display: flex, position:relative, position: absolute.