Guest User

SVG skull with HTML and CSS

a guest
Oct 5th, 2024
61
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
HTML 1.74 KB | Source Code | 0 0
  1. <style>
  2.  
  3. .topleft-triangle {    transform: translate(59px, -250px);}
  4. .topright-triangle {    transform: translate(-138px, -400px);}
  5. .right-rectangle {    transform: translate(-49px, -400px);}
  6. .left-rectangle {    transform: translate(105px, -550px);}
  7. .left-eye {    transform: translate(-30px, -750px);}
  8. .right-eye {    transform: translate(35px, -890px);}
  9.  
  10.  
  11. </style>
  12. <body>
  13.  
  14. <div style="display: block; margin: auto;">
  15.     <svg style="display: block; margin: auto;">
  16.         <rect width="110" height="150" style="fill: black;" />
  17.         <line x1="20" y1="0" x2="20" y2="500" style="stroke:white;stroke-width:5" />
  18.         <line x1="40" y1="0" x2="40" y2="500" style="stroke:white;stroke-width:5" />
  19.         <line x1="60" y1="0" x2="60" y2="500" style="stroke:white;stroke-width:5" />
  20.         <line x1="80" y1="0" x2="80" y2="500" style="stroke:white;stroke-width:5" />
  21.         <rect width="110" height="120" style="fill: black;" />
  22.     </svg>
  23.     <svg class="topleft-triangle" style="display: block; margin: auto;">
  24.       <polygon points="50,100 140,190 50,190" style="fill:black;"/>
  25.     </svg>
  26.     <svg class="topright-triangle" style="display: block; margin: auto;">
  27.       <polygon points="140, 100 140,190 50,190" style="fill:black;"/>
  28.     </svg> 
  29.     <svg class="right-rectangle" style="display: block; margin: auto;">
  30.       <rect width="55" height="50" style="fill: black;" />
  31.     </svg>
  32.     <svg class="left-rectangle" style="display: block; margin: auto;">
  33.       <rect width="55" height="50" style="fill: black;" />
  34.     </svg>
  35.     <svg class="left-eye" style="display: block; margin: auto;">
  36.       <circle r="25" cx="50" cy="50" fill="white" />
  37.     </svg>
  38.     <svg class="right-eye" style="display: block; margin: auto;">
  39.       <circle r="15" cx="50" cy="50" fill="white" />
  40.     </svg>
  41.  
  42. </div>
  43.  
  44. </body>
Tags: html svg CSS
Advertisement
Add Comment
Please, Sign In to add comment