Advertisement
Guest User

Untitled

a guest
Apr 19th, 2014
47
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.92 KB | None | 0 0
  1. HTML:
  2. <svg width="0" height="0">
  3. <defs>
  4. <!-- BLUE GRAPHIC -->
  5. <g id="blue_background">
  6. <polygon fill="#C8D9E5" points="[...in the fiddle...]"/>
  7. </g>
  8.  
  9. <!-- GREEN GRAPHIC -->
  10. <g id="green_background">
  11. <path fill="#49B974" d="[...in the fiddle...]"/>
  12. </g>
  13. </defs>
  14. </svg>
  15.  
  16.  
  17. <div class="box">
  18. <h1>asdasdasd</h1>
  19. <h1>asdasdasd</h1>
  20. <h1>asdasdasd</h1>
  21. <svg class="svg1" viewBox="0 0 600 200" >
  22. <use xlink:href="#blue_background" width="100%" height="100%"></use>
  23. </svg>
  24. </div>
  25.  
  26. <div class="box">
  27. <h1>asdasdasd</h1>
  28. <h1>asdasdasd</h1>
  29. <h1>asdasdasd</h1>
  30. <svg class="svg2" viewBox="0 0 200 200">
  31. <use xlink:href="#green_background" width="100%" height="100%"></use>
  32. </svg>
  33. </div>
  34.  
  35. .box {
  36. position: relative;
  37. width: 400px;
  38. border: 1px solid #ddd;
  39. }
  40. svg {
  41. position:absolute;
  42. height:100%;
  43. top:0; right:0;
  44. z-index:-1;
  45. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement