How can I remove the red part of the svg kinda like how when you remove the background of an image for example the file turns into a png and the part you removed shows the checkered pattern.
After removing the red part, the orange color from the section should be showing.
* {
padding: 0;
margin: 0;
}
body {
background: orange;
}
<section>
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 1000 100" fill="#FF0000">
<rect fill="#FFF" width="100%" height="100%"/>
<path d="M0 0v100c166.7 0 166.7-66 333.3-66S500 77 666.7 77 833.3 28 1000 28V0H0Z" opacity=".5"></path>
<path d="M0 0v100c166.7 0 166.7-66 333.3-66S500 70 666.7 70 833.3 16 1000 16V0H0Z" opacity=".5"></path>
<path d="M0 0v100c166.7 0 166.7-66 333.3-66S500 63 666.7 63 833.3 4 1000 4V0H0Z"></path>
</svg>
</section>
3
Answers
Try changing the fill of rect.
You may think about using CSS filter, but there are many difficulties because the elements that can be controlled are red.
I hope it helps 🙂
Method1
A new svg image
I worked with illustration and photoshop and saved it as an svg file.
So, you can get white elemnt, transparent background
Method2
Red path to orange
The svg currently has the part represented in red as an object. It’s hard to change it to transparent. You can match it with the background color.
Remove white background
Method1
Method2
There is also a way to set transparency.
For example, I adjusted it moderately.
Effect of removing the red part of the SVG so that the underlying orange background shows through, you need to modify the SVG to make its fill transparent where you want it to show the background color.
Set the fill of the rect and path elements to none where you want transparency.
Ensure the paths you want to be transparent have fill="none" or fill-opacity="0" properties.
Code should be like this.
Now, when you view this HTML, the red fill will be removed, and you should see the orange background through the SVG paths.