Skip to content

Instantly share code, notes, and snippets.

@archana-s
Last active November 7, 2021 02:53
Show Gist options
  • Star 6 You must be signed in to star a gist
  • Fork 2 You must be signed in to fork a gist
  • Save archana-s/8947217 to your computer and use it in GitHub Desktop.
Save archana-s/8947217 to your computer and use it in GitHub Desktop.
body {
background-color: black;
}
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<title>JS Bin</title>
</head>
<body>
<svg xmlns="http://www.w3.org/2000/svg"
xmlns:xlink="http://www.w3.org/1999/xlink"
width="500" height="600">
<defs>
<filter id="innershadow" x0="-50%" y0="-50%" width="200%" height="200%">
<feGaussianBlur in="SourceAlpha" stdDeviation="3" result="blur"></feGaussianBlur>
<feOffset dy="2" dx="3"></feOffset>
<feComposite in2="SourceAlpha" operator="arithmetic" k2="-1" k3="1" result="shadowDiff"></feComposite>
<feFlood flood-color="#A60808" flood-opacity="0.75"></feFlood>
<feComposite in2="shadowDiff" operator="in"></feComposite>
<feComposite in2="SourceGraphic" operator="over" result="firstfilter"></feComposite>
<feGaussianBlur in="firstfilter" stdDeviation="3" result="blur2"></feGaussianBlur>
<feOffset dy="-2" dx="-3"></feOffset>
<feComposite in2="firstfilter" operator="arithmetic" k2="-1" k3="1" result="shadowDiff"></feComposite>
<feFlood flood-color="#A60808" flood-opacity="0.75"></feFlood>
<feComposite in2="shadowDiff" operator="in"></feComposite>
<feComposite in2="firstfilter" operator="over"></feComposite>
</filter>
</defs>
<circle cx="300" cy="200" r="40" filter="url(#innershadow)" fill="tan"/>
<circle cx="300" cy="400" r="40" fill="tan"/>
</svg>
</body>
</html>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment