CSS related to printing

Source: Internet
Author: User
Summary table:
 
Printing Properties
Attribute
CSS version
Version
Compatibility
Compatibility
Inherit from parent
Inheritance
Description
Introduction
Page Css2 Ie5.5 + Yes The page type used to retrieve or specify the Display object container (Pagetype). See @ page rules
Page-break-after Css2 Ie4 + None Page delimiter that appears after an object is retrieved or set
Page-break-before Css2 Ie4 + None Retrieve or set the page delimiter that appears before an object
Page-break-inside Css2 None Yes Retrieve or set the page delimiter that appears in the object container
Marks Css2 None None Set or retrieve the flag that should be given outside the page container
Orphans Css2 None Yes Sets or retrieves the minimum number of rows that must be left at the bottom of a page.
Size Css2 None Yes Retrieve or adjust the specified page type
Widows Css2 None Yes Retrieve or specify the number of rows that must be left at the top of the page

Note: Green is the standard property of css2. Red is a property currently not supported by browsers.

 

Page

:

@ Page

: Compatibility: ie5.5 +

Syntax:
 
@ PageLabelPseudo-class{Srules}
 
Note:
 
Label:Tab
Pseudo-class:Pseudo class. : First |: Left |: Right
Srules:Style Sheet Definition
 
Set the layout, direction, and edge space of the page container.
The page container includes the blank side padding area of the page content area and content area.
 
Example:
 
@ Page thin: first {size: 3in 8in}

 

Page-break-after

 

 

 

Page-break-before

 

Page-break-inside

 

Marks

 

Orphans

 

Size

 

Widows

 

@ Media

: Compatibility: ie5 +
 
Syntax:
 
@ MediaSmedia {Srules}
 
Note:
 
Smedia:Specify the device name. See Appendix: Device Type
Srules:Style Sheet Definition
 
Specify a style sheet rule for the specified device type. See link object'sMediaAttribute (feature ).
 
Example:
 
// Set the display font size
@ Media screen {
Body {font-size: 12pt ;}
}
 
// Set the Printer Font Size
@ Media Print {
@ Import "print.css"
Body {font-size: 8pt ;}
}
: Compatibility: none inheritance: None
 
Syntax:
 
Size:Auto|Portrait|Landscape|Length
 
Parameters:
 
Auto:Relative page container specified to adapt to the target paper size and direction
Portrait:Specify the relative page container to adapt to the size and direction of the target paper. Ignore the default content direction of the target page and use the document stream to span from left to right, A typical example of a long-distance bridge (vertical mode)
Landscape:Specify the relative page container to adapt to the size and direction of the target paper. Ignore the current default content direction of the target page and use the horizontal mode.
Length:Length Value composed of floating point numbers and unit identifiers. Specifies the absolute page container of a fixed size and direction. If there is only one parameter, the height and width are specified. The two are separated by spaces. The first is the specified height, and the second is the specified width. See length unit
 
Note:
 
Retrieve or adjust the specified page type. It classifies page containers as absolute and relative. The absolute page has a fixed size. The relative page container will adjust the size of the target paper.
Currently, ie5.5 does not support this attribute.
Corresponding script features:Size. For more information, see my other bibliography.
 
Example:
 
Body {size: 8.5in 11in}

: Compatibility: none inheritance: Yes
 
Syntax:
 
Widows: Number
 
Parameters:
 
Number:No unit integer. Cannot be negative
 
Note:
 
Search or specify the number of rows that must be left at the top of the page.
Currently, ie5.5 does not support this attribute.
Corresponding script features: Widows. For more information, see my other bibliography.
 
Example:
 
P {widows: 1}
: Compatibility: none inheritance: Yes
 
Syntax:
 
Orphans: Number
 
Parameters:
 
Number:Integer
 
Note:
 
Sets or retrieves the minimum number of rows that must be left at the bottom of a page.
Currently, ie5.5 does not support this attribute.
Corresponding script features: Orphans.
Compatibility: none inheritance: None
 
Syntax:
 
Marks: None| Crop| Cross
 
Parameters:
 
None:No page mark appears
Crop:The cutting mark will be specified at the cropping area on the page.
Cross:Specify the crosstab mark for page alignment
 
Note:
 
Printed documents are usually marked out of the page content area and used to correct and adjust all pages. This attribute is used to set or retrieve the flag that should be given outside the page container.
Currently, ie5.5 does not support this attribute.
Corresponding script features: Marks.
: Compatibility: none inheritance: Yes
 
Syntax:
 
Page-break-inside: Auto| Avoid
 
Parameters:
 
Auto:If you want to insert a page delimiter to the object container
Avoid:Disable page delimiters in the current object container
 
Note:
 
Retrieves or sets the page delimiter that appears in the object container.
Currently, ie5.5 does not support this attribute.
Corresponding script features: Pagebreakinside.
: Compatibility: ie4 + inheritance: None
 
Syntax:
 
Page-break-before: Auto| Always| Avoid| Left| Right| Null
 
Parameters:
 
Auto:If you want to insert a page delimiter before the object
Always:Always insert a page delimiter before the object
Avoid:Avoid inserting page delimiters before objects
Left:Insert a page delimiter in front of the object until it reaches the left edge of a blank page.
Right:Insert a page delimiter before the object until it reaches a blank right page.
Null:Null Value. Ie5 is used to Cancel Page delimiter settings
 
Note:
 
Retrieves or sets the page delimiter that appears before an object.
Ie5 only supports the always and blank values ( Null).
In ie4, this attribute does not act on the BR object, but ie5 does.
Corresponding script features: Pagebreakbefore.
: Compatibility: ie4 + inheritance: None
 
Syntax:
 
Page-break-after: Auto| Always| Avoid| Left| Right| Null
 
Parameters:
 
Auto:If you need to insert a page delimiter after the object
Always:Always insert a page delimiter after the object
Avoid:Avoid inserting page delimiters behind objects
Left:Insert a page delimiter after the object until it reaches the left edge of a blank page.
Right:Insert a page delimiter after the object until it reaches a blank right page.
Null:Null Value. Ie5 is used to Cancel Page delimiter settings
 
Note:
 
The page delimiter that appears after the object is retrieved or set.
Ie5 only supports the always and blank values ( Null).
In ie4, this attribute does not act on the BR object, but ie5 does.
Corresponding script features: Pagebreakafter.
 
Example:
 
P {page-break-after: Always ;}
Compatibility: ie5.5 + inheritance: Yes
 
Syntax:
 
Page: Auto| Pagetype
 
Parameters:
 
Auto:Refer to the current default page
Pagetype:Specifies a page type in the @ page rule ( Pagetype) Definition
 
Note:
 
The page type used to retrieve or specify the Display object container ( Pagetype). See @ page rules.
Corresponding script features: Page.

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.