Skip to content

Instantly share code, notes, and snippets.

@paulwellnerbou
Created November 17, 2017 16:39
Show Gist options
  • Save paulwellnerbou/f98086aad6d890cb19ee8445d8983b80 to your computer and use it in GitHub Desktop.
Save paulwellnerbou/f98086aad6d890cb19ee8445d8983b80 to your computer and use it in GitHub Desktop.
SVG Graphic for lower right page turning, designed carefully by hand, keeping the SVG code as simple as possible
Display the source blob
Display the rendered blob
Raw
<svg width="100" height="100" xmlns="http://www.w3.org/2000/svg">
<defs>
<linearGradient id="toblack" x1="6%" y1="6%" x2="80%" y2="80%">
<stop offset="0%" style="stop-color:rgb(0,0,0);stop-opacity:0;"/>
<stop offset="100%" style="stop-color:rgb(0,0,0);stop-opacity:1;"/>
</linearGradient>
<linearGradient id="shadow" x1="45%" y1="45%" x2="70%" y2="70%">
<stop offset="0%" style="stop-color:rgb(0,0,0);stop-opacity:1;"/>
<stop offset="10%" style="stop-color:rgb(0,0,0);stop-opacity:.9;"/>
<stop offset="100%" style="stop-color:rgb(0,0,0);stop-opacity:0;"/>
</linearGradient>
<mask id="page-corner-curves">
<rect width="100%" height="100%" fill="white"/>
<path d="M 100 0 C 100 20 25 20 10 10 C 20 25 20 100 0 100 L 0 0 Z" fill="black" stroke="white"/>
</mask>
<mask id="complete-page-corner-with-curves">
<rect width="100%" height="100%" fill="white"/>
<path d="M 100 0 C 100 20 25 20 10 10 C 20 25 20 100 0 100 L 0 0 Z" fill="black" stroke="white"/>
<path d="M 98 4 L 10 10 L 4 98 Z" fill="black"/>
</mask>
</defs>
<polygon points="100 0 100 100 0 100" fill="url(#shadow)" mask="url(#complete-page-corner-with-curves)"/>
<path d="M 98 4 L 10 10 L 4 98 Z" fill="url(#toblack)" mask="url(#page-corner-curves)"/>
</svg>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment