Page borders in pure CSS


/ Published in: CSS
Save to your folder(s)

Inserire bordi alla pagina tramite CSS


Copy this code and paste it in your HTML
  1. /*------------------------------------*\
  2. BORDERS
  3. \*------------------------------------*/
  4.  
  5. /* Create a series of empty pseudo-elements... */
  6. html:before,html:after,body:before,body:after{
  7. content:"";
  8. background:#dad8bb;
  9. position:fixed;
  10. display:block;
  11. z-index:5;
  12. }
  13.  
  14. /* ...and position them! */
  15. html:before{
  16. height:10px;
  17. left:0;
  18. right:0;
  19. top:0;
  20. }
  21. html:after{
  22. width:10px;
  23. top:0;
  24. right:0;
  25. bottom:0;
  26. }
  27. body:before{
  28. height:10px;
  29. right:0;
  30. bottom:0;
  31. left:0;
  32. }
  33. body:after{
  34. width:10px;
  35. top:0;
  36. bottom:0;
  37. left:0;
  38. }

URL: http://csswizardry.com/2010/12/simplified-page-borders-in-pure-css/

Report this snippet


Comments

RSS Icon Subscribe to comments

You need to login to post a comment.