Skip to content

Instantly share code, notes, and snippets.

@webag
Created December 6, 2023 12:14
Show Gist options
  • Save webag/762ec69e3f6256974532749aa7014d4a to your computer and use it in GitHub Desktop.
Save webag/762ec69e3f6256974532749aa7014d4a to your computer and use it in GitHub Desktop.
SVG goo intersection blur. СВГ скругление пересечений путей.
<div class="box">
<div class="test"></div>
<div class="test-2"></div>
</div>
<svg xmlns="http://www.w3.org/2000/svg" version="1.1">
<defs>
<filter id="goo">
<feGaussianBlur in="SourceGraphic" stdDeviation="3" result="blur" />
<feColorMatrix in="blur" mode="matrix" values="1 0 0 0 0 0 1 0 0 0 0 0 1 0 0 0 0 0 19 -9" result="goo" />
<feComposite in="SourceGraphic" in2="goo" operator="atop" />
</filter>
</defs>
</svg>
<style>
.box {
display: flex;
align-items: center;
filter:url("#goo");
}
.test {
width: 180px;
height: 50px;
border-radius: 50px;
background: red;
}
.test-2{
width: 50px;
height: 50px;
background: red;
border-radius: 50%;
}
</style>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment