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

mozilla
Ihre Suchergebnisse

    @page

    Unsere Freiwilligen haben diesen Artikel noch nicht in Deutsch übersetzt. Machen Sie mit und helfen Sie, das zu erledigen!

    Summary

    The @page CSS at-rule is used to modify some CSS properties when printing a document. You can't change all CSS properties with @page. You can only change the margins, orphans, widows, and page breaks of the document. Attempts to change any other CSS properties will be ignored.

    The @page at-rule can be accessed via the CSS object model interface CSSPageRule.

    Note: The W3C is discussing how to handle viewport-related <length> units, vh, vw, vmin, and vmax. Meanwhile do not use them within a @page at-rule.

    Syntax

    @page :pseudo-class {
      margin:2in;
    }
    

    Examples

    Please refer to the various pseudo-classes of @page for examples.

    Specifications

    Specification Status Comment
    CSS Paged Media Module Level 3 Working Draft No change from CSS Level 2 (Revision 1), though more CSS at-rules can be used inside a @page.
    CSS Level 2 (Revision 1) Recommendation  

    Browser compatibility

    Feature Chrome Firefox (Gecko) Internet Explorer Opera Safari
    Basic support 2.0 19.0 (19.0) 8.0 6.0 5.0
    Feature Android Firefox Mobile (Gecko) IE Mobile Opera Mobile Safari Mobile
    Basic support ? 19.0 (19.0) ? ? ?

    See also

    Schlagwörter des Dokuments und Mitwirkende

    Mitwirkende an dieser Seite: Sheppy, teoli, ethertank, kscarfone, FredB, McGurk
    Zuletzt aktualisiert von: kscarfone,
    Seitenleiste ausblenden