Want to share your CSS expertise with others? Apply to the MDN Fellowship by April 1! http://mzl.la/MDNFellowship

Your Search Results


    « CSS « CSS Reference « Mozilla Extensions

    For a system that works on any background, see -moz-image-rect.


    For certain XUL elements and pseudo-elements that use an image from the list-style-image property, this property specifies a region of the image that is used in place of the whole image. This allows elements to use different pieces of the same image to improve performance.

    The syntax is similar to the clip property. All four values are relative to the upper left corner of the image.


    -moz-image-region: rect(top, right, bottom, left);


    #example-button {
      /* display only the 4x4 area from the top left of this image */
      list-style-image: url("chrome://example/skin/example.png");
      -moz-image-region: rect(0px, 4px, 4px, 0px);
    #example-button:hover {
      /* use the 4x4 area to the right of the first for the hovered button */
      -moz-image-region: rect(0px, 8px, 4px, 4px);

    Document Tags and Contributors

    Last updated by: Sebastianz,