Advertisement
decembre

CSS - CLIP v.1

May 8th, 2016
218
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.58 KB | None | 0 0
  1.  
  2. ============================
  3. ======== CSS - CLIP v.1 - POSTé
  4. ============================
  5.  
  6. ============================
  7. =========== CLIP - rect (top, right, bottom, left)
  8. image:clip:rect(0px,60px,200px,0px);
  9. ==http://forum.alsacreations.com/topic-4-22305-1-Resolu-Crop-image-CSS.html
  10. Note NEED:
  11. - ABSOLUTE
  12. - Does not work if "overflow:visible".
  13. - VISIBLE
  14. shape Clips an element. The only valid value is: Play it »
  15. auto No clipping will be applied. This is default Play it »
  16. inherit Specifies that the value of the clip property should be inherited from the parent element
  17.  
  18. img
  19. {
  20. position:absolute;
  21. clip:rect(0px,60px,200px,0px);
  22. }
  23.  
  24. What happens if an image is larger than its containing element? -
  25. The clip property lets you specify the dimensions of an absolutely positioned element
  26. that should be visible, and the element is clipped into this shape, and displayed.
  27. object.style.clip="rect(0px,50px,50px,0px)"
  28.  
  29. ============================
  30. =========== YAHOO MAIL - NBR MAILS IN CUSTOM FOLDER
  31. /* CUSTOM FOLDERS - NBR MAILS IN EACH - HOVER/CLIP -
  32.  
  33. CLIP:
  34. rect (top, right, bottom, left)
  35. image:clip:rect(0px,60px,200px,0px);
  36.  
  37. === */
  38. #custom-folders li.folder:hover a:after {
  39. clip:rect(0px,350px,9px,155px) !important;
  40. position: absolute !important;
  41. width: 200px !important;
  42. height: 10px !important;
  43. line-height: 3px !important;
  44. right: 2px !important;
  45. bottom: -2px !important;
  46. content:attr(title) !important;
  47. font-size: 5px !important;
  48. color: black !important;
  49. background: gold !important;
  50. padding: 0 2px !important;
  51. text-align: right !important;
  52. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement