Advertisement
Guest User

Untitled

a guest
Apr 17th, 2014
30
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.38 KB | None | 0 0
  1. <div class="imgfield effect1 effect2 effect3"> </div>
  2.  
  3. .imgfield { background: url(someimage.jpg); ... width, height etc. }
  4. .effect1 { outline: yellow 2px solid; outline-offset: -4px; }
  5. .effect2 { outline: red 2px solid; outline-offset: -8px; }
  6. .effect3 { outline: blue 2px solid; outline-offset: -12px; }
  7.  
  8. .effect {
  9. height: 200px;
  10. width: 200px;
  11. outline: 1px solid #000;
  12. position:relative;/* pick as reference for pseudo absolute */
  13. -moz-box-sizing:border-box; /* keep box within size given */
  14. box-sizing:border-box;
  15. }
  16. /* size pseudo within from coordonates */
  17. .effect:before {
  18. content:"";
  19. top:2px;
  20. left:2px;
  21. right:2px;
  22. bottom:2px;
  23. border: green 2px solid;
  24. position: absolute;
  25. }
  26. .effect:after {
  27. content:"";
  28. top:6px;
  29. left:6px;
  30. right:6px;
  31. bottom:6px;
  32. border: red 2px solid;
  33. position: absolute;
  34. }
  35.  
  36. .effect {
  37. height: 200px;
  38. width: 200px;
  39. outline: 1px solid #000;
  40. }
  41.  
  42. .effect:before {
  43. content: "";
  44. height: 200px;
  45. width: 200px;
  46. outline: green 2px solid;
  47. outline-offset: -4px;
  48. display: block;
  49. position: absolute;
  50. }
  51.  
  52. .effect:after {
  53. content: "";
  54. display: block;
  55. height: 200px;
  56. width: 200px;
  57. outline: red 2px solid;
  58. outline-offset: -8px;
  59. position: absolute;
  60. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement