威慑力是什么意思| 大腿肿胀是什么原因| 336是什么意思| 芋头是什么季节的| 吃什么补钙最快| 跳蚤咬了擦什么药最好| 试管婴儿长方案是什么| ug是什么意思| 什么的白桦| 雷峰塔为什么叫雷峰塔| 擦边球是什么意思| 婴儿有眼屎是什么原因引起的| 男人下面胀痛什么原因造成呢| 血脂高会导致什么后果| 槟子是什么水果| 产值是什么| 什么组词| wifi用户名是什么| 急功近利什么意思| 出汗是什么原因| 莘字五行属什么| 宫保鸡丁属于什么菜系| 弯的直的什么意思| 查幽门螺杆菌挂什么科| 男人梦到蛇预示着什么| 什么时候说什么话| 救赎什么意思| 晨跑有什么好处| 欣字属于五行属什么| 星巴克是什么| 胃烧灼感吃什么药| 浅褐色是什么颜色| 溺爱的意思是什么| 心脏t波改变是什么意思| 淋巴肿瘤吃什么食物好| 肺部结节吃什么好| delsey是什么牌子| 爱意是什么意思| CNN什么意思| 血管炎是什么症状| 意淫是什么意思| 九月二十八是什么星座| 高血压属于什么系统疾病| 倾国倾城什么意思| 什么是三级片| 红萝卜什么时候种| 灰枣与红枣有什么区别| 变异是什么意思| 肝脏在什么位置图片| 便溏什么意思| 梦到自行车丢了是什么意思| 胃部间质瘤是什么性质的瘤| 盆腔炎吃什么消炎药效果好| 7月30号什么星座| 什么是塔罗牌| 脚热是什么原因引起的| 毛骨鱼是什么鱼| 狐臭和腋臭有什么区别| 老做梦是什么原因| playboy什么意思| 什么是矫正视力| 血糖查什么项目| 点子是什么意思| 平安顺遂什么意思| 阴历六月十八是什么日子| 当局是什么意思| praal00是什么型号| 吾子是什么意思| 赫五行属性是什么| 12月8号什么星座| 鱼皮是什么鱼的皮| 2.26是什么星座| 两个土念什么| 常规血检能查出什么| 吃坏东西肚子疼吃什么药| 牙龈萎缩吃什么药| 毛毛虫吃什么| 大张伟的真名叫什么| 相思病是什么意思| 清和是什么意思| 晚上看见黄鼠狼有什么预兆| 纪元是什么意思| 灰色鞋子搭配什么颜色裤子| 维生素b4又叫什么| mexican是什么牌子| 为什么明星整牙那么快| 砚台是什么| 为什么生日不能提前过| 怀孕初期胸部有什么变化| 白鸭是什么鸭| 没有精液是什么原因| 梦见邻居是什么意思| 什么是阴茎| pab是什么意思| 黄眉大王是什么妖怪| 01什么意思| 咖啡对心脏有什么影响| 与君共勉是什么意思| 白癜风是什么样子的| 香菜吃多了有什么坏处| 音调是由什么决定的| 牙齿上有黑点是什么原因| 节制是什么意思| 氧化亚铜什么颜色| 左侧附件区囊性占位是什么意思| 铁观音适合什么季节喝| 大黄鸭是什么牌子| 茉莉茶叶属于什么茶| 有核红细胞是什么意思| 3月18日什么星座| 什么奶粉跟母乳一个味| 仁字五行属什么| 上不来气是什么原因| 大战三百回合是什么意思| 耗儿鱼是什么鱼| 输卵管发炎有什么症状表现| 单的姓氏读音是什么| 零点是什么| 多保重是什么意思| 蝎子泡酒有什么功效| 满是什么结构| 做梦杀人了是什么征兆| 脾胃湿热吃什么药好| 全程c反应蛋白高说明什么| 头孢曲松是什么药| 地壳是什么| 连襟什么意思| 子宫直肠窝积液是什么意思| 我方了是什么意思| 副词是什么| 老鼠吃什么| 细菌性阴道炎有什么症状| 查肝功能能查出什么病| 5月份什么星座| 伤风是什么意思| 北京的区长是什么级别| 两极分化是什么意思| 癫痫病是什么症状| 摔纹皮是什么皮| 心肌缺血做什么检查能查出来| 吉祥三宝是什么意思| 五险都有什么险| 孕前检查挂什么科| 农历8月是什么月| 女性尿道感染吃什么药| 紫癜是一种什么病| 1966年属什么今年多大| 尿酸高喝什么水最好| 飞行员妻子有什么待遇| 2月6号是什么星座| 红细胞分布宽度偏低是什么原因| 现在可以种什么农作物| 口臭舌苔白厚吃什么药| 处暑什么意思| 2017年是什么命| 手术后吃什么| 相形见拙什么意思| 建议MRI检查是什么意思| bi是什么意思| 高凝状态是什么意思| 生姜吃多了有什么害处| 坏血症什么症状| 胸口痛挂什么科| 胶囊是什么原料做的| 睡觉尿多是什么原因| 什么叫丹凤眼| 脚后跟痒是什么原因| 为什么睾丸一边大一边小| 两弹一星指什么| 桑叶泡水喝有什么好处| 上海有什么好玩的地方适合小孩子| 腮腺炎吃什么药最管用| 女人吃猪肝有什么好处| 怀孕甲减对孩子有什么影响| 印迹杂交技术检查什么| 三阳开泰是什么生肖| 降低转氨酶吃什么药| 糖尿病喝什么茶| 哥斯拉是什么| 孕期头晕是什么原因| 疯狂动物城闪电是什么动物| 口干嗓子干是什么原因| 御守是什么意思| 滤泡性咽炎吃什么药| 静脉血栓是什么症状| 什么叫出柜| 鳖是什么动物| 妄想症是什么意思| 磷是什么| 市场部是做什么的| 8月份是什么季节| 点状钙化是什么意思| 身上长白点是什么原因| fda是什么| 为什么一饿就胃疼| 月亮是什么| 观照是什么意思| 苹果6和苹果6S有什么区别| 十八罗汉是什么意思| 过敏性鼻炎吃什么| 炁怎么读什么意思| 松鼠吃什么食物| pr是什么工作| 宝宝睡觉突然大哭是什么原因| 夏季吃什么水果好| 为什么手指会发麻| rip什么意思| 病毒性咳嗽吃什么药好| 长期尿黄可能是什么病| 腿弯处的筋痛是什么原因| hrs是什么意思| 相对密度是什么意思| 素什么意思| 公元前是什么意思| 窦性心律不齐吃什么药| m型发际线适合什么发型| 什么蛋营养价值最高| 5月16日是什么星座| 医学hr是什么意思| 农历五月二十是什么星座| 什么是鸡尾酒| 刚开始怀孕会有什么症状| 氢化油是什么东西| 密送是什么意思| 考研复试是什么意思| 非营利性医院是什么意思| 人参果是什么季节的| 凯撒沙拉酱是什么口味| 相机hdr功能是什么意思| 肝肾不足是什么意思| 脚筋膜炎什么办法恢复的最快| 什么是幸福| 乌合之众什么意思| 脚底板热是什么原因| 什么地赶来| 木乃伊是什么| 六月二十九日是什么星座| 卵巢早衰吃什么药| 五月十三号是什么日子| 已故是什么意思| 唐玄宗为什么叫唐明皇| 耳毛念什么| 拉伸有什么好处| crayon什么意思| 为什么打死不吃骡子肉| 胃胀打嗝吃什么药| 吃醋是什么意思| 什么人容易得间质瘤| 脸黑的人适合穿什么颜色的衣服| 在于是什么意思| 身上发痒是什么原因| 地中海是什么意思| 经常拉肚子是什么原因引起的| 女性黄体期是什么时候| 日行千里是什么生肖| 查肾功能挂什么科| 什么叫尿潴留| ph值低是什么原因| 红色加黄色等于什么颜色| 奶白色是什么颜色| 青金石蓝是什么颜色| 为什么减肥不掉秤| 卖腐是什么意思| 幽门螺杆菌吃什么药最好| 百度

光大海口分行“最后一公里”创新服务惠及万家

百度 鲁迅笔下的阿Q、祥林嫂,他所描绘的围观斩首、人血馒头,无不是哀其不幸而怒其不争。

Contents

Note: Several sections of this specification have been updated by other specifications. Please, see "Cascading Style Sheets (CSS) — The Official Definition" in the latest CSS Snapshot for a list of specifications and the sections they replace.

The CSS Working Group is also developing CSS level 2 revision 2 (CSS 2.2).

13.1 Introduction to paged media

Paged media (e.g., paper, transparencies, pages that are displayed on computer screens, etc.) differ from continuous media in that the content of the document is split into one or more discrete pages. To handle pages, CSS 2.1 describes how page margins are set on page boxes, and how page breaks are declared.

The user agent is responsible for transferring the page boxes of a document onto the real sheets where the document will ultimately be rendered (paper, transparency, screen, etc.). There is often a 1-to-1 relationship between a page box and a sheet, but this is not always the case. Transfer possibilities include:

13.2 Page boxes: the @page rule

The page box is a rectangular region that contains two areas:

The size of a page box cannot be specified in CSS 2.1.

Authors can specify the margins of a page box inside an @page rule. An @page rule consists of the keyword "@page", followed by an optional page selector, followed by a block containing declarations and at-rules. Comments and white space are allowed, but optional, between the @page token and the page selector and between the page selector and the block. The declarations in an @page rule are said to be in the page context.

Note: CSS level 2 has no at-rules that may appear inside @page, but such at-rules are expected to be defined in level 3.

The page selector specifies for which pages the declarations apply. In CSS 2.1, page selectors may designate the first page, all left pages, or all right pages

The rules for handling malformed declarations, malformed statements, and invalid at-rules inside @page are as defined in section 4.2, with the following addition: when the UA expects the start of a declaration or at-rule (i.e., an IDENT token or an ATKEYWORD token) but finds an unexpected token instead, that token is considered to be the first token of a malformed declaration. I.e., the rule for malformed declarations, rather than malformed statements is used to determine which tokens to ignore in that case.

13.2.1 Page margins

In CSS 2.1, only the margin properties ('margin-top', 'margin-right', 'margin-bottom', 'margin-left', and 'margin') apply within the page context. The following diagram shows the relationships between the sheet, page box, and page margins:

Illustration of sheet, page
box, margin, and page area.   [D]

Example(s):

Here is a simple example which sets all page margins on all pages:

@page {
  margin: 3cm;
}

The page context has no notion of fonts, so 'em' and 'ex' units are not allowed. Percentage values on the margin properties are relative to the dimensions of the page box; for left and right margins, they refer to the width of the page box while for top and bottom margins, they refer to the height of the page box. All other units associated with the respective CSS 2.1 properties are allowed.

Due to negative margin values (either on the page box or on elements) or absolute positioning content may end up outside the page box, but this content may be "cut" — by the user agent, the printer, or ultimately, the paper cutter.

13.2.2 Page selectors: selecting left, right, and first pages

When printing double-sided documents, the page boxes on left and right pages may be different. This can be expressed through two CSS pseudo-classes that may be used in page selectors.

All pages are automatically classified by user agents into either the :left or :right pseudo-class. Whether the first page of a document is :left or :right depends on the major writing direction of the root element. For example, the first page of a document with a left-to-right major writing direction would be a :right page, and the first page of a document with a right-to-left major writing direction would be a :left page. To explicitly force a document to begin printing on a left or right page, authors can insert a page break before the first generated box.

Example(s):

@page :left {
  margin-left: 4cm;
  margin-right: 3cm;
}

@page :right {
  margin-left: 3cm;
  margin-right: 4cm;
}

If different declarations have been given for left and right pages, the user agent must honor these declarations even if the user agent does not transfer the page boxes to left and right sheets (e.g., a printer that only prints single-sided).

Authors may also specify style for the first page of a document with the :first pseudo-class:

Example(s):

@page { margin: 2cm } /* All margins set to 2cm */

@page :first {
  margin-top: 10cm    /* Top margin on first page 10cm */
}

Properties specified in a :left or :right @page rule override those specified in an @page rule that has no pseudo-class specified. Properties specified in a :first @page rule override those specified in :left or :right @page rules.

If a forced break occurs before the first generated box, it is undefined in CSS 2.1 whether ':first' applies to the blank page before the break or to the page after it.

Margin declarations on left, right, and first pages may result in different page area widths. To simplify implementations, user agents may use a single page area width on left, right, and first pages. In this case, the page area width of the first page should be used.

13.2.3 Content outside the page box

When formatting content in the page model, some content may end up outside the current page box. For example, an element whose 'white-space' property has the value 'pre' may generate a box that is wider than the page box. As another example, when boxes are positioned absolutely or relatively, they may end up in "inconvenient" locations. For example, images may be placed on the edge of the page box or 100,000 meters below the page box.

The exact formatting of such elements lies outside the scope of this specification. However, we recommend that authors and user agents observe the following general principles concerning content outside the page box:

13.3 Page breaks

This section describes page breaks in CSS 2.1. Five properties indicate where the user agent may or should break pages, and on what page (left or right) the subsequent content should resume. Each page break ends layout in the current page box and causes remaining pieces of the document tree to be laid out in a new page box.

13.3.1 Page break properties: 'page-break-before', 'page-break-after', 'page-break-inside'

'page-break-before'
Value:  auto | always | avoid | left | right | inherit
Initial:  auto
Applies to:  block-level elements (but see text)
Inherited:  no
Percentages:  N/A
Media:  visual, paged
Computed value:  as specified
'page-break-after'
Value:  auto | always | avoid | left | right | inherit
Initial:  auto
Applies to:  block-level elements (but see text)
Inherited:  no
Percentages:  N/A
Media:  visual, paged
Computed value:  as specified
'page-break-inside'
Value:  avoid | auto | inherit
Initial:  auto
Applies to:  block-level elements (but see text)
Inherited:  no
Percentages:  N/A
Media:  visual, paged
Computed value:  as specified

Values for these properties have the following meanings:

auto
Neither force nor forbid a page break before (after, inside) the generated box.
always
Always force a page break before (after) the generated box.
avoid
Avoid a page break before (after, inside) the generated box.
left
Force one or two page breaks before (after) the generated box so that the next page is formatted as a left page.
right
Force one or two page breaks before (after) the generated box so that the next page is formatted as a right page.

A conforming user agent may interpret the values 'left' and 'right' as 'always'.

A potential page break location is typically under the influence of the parent element's 'page-break-inside' property, the 'page-break-after' property of the preceding element, and the 'page-break-before' property of the following element. When these properties have values other than 'auto', the values 'always', 'left', and 'right' take precedence over 'avoid'.

User Agents must apply these properties to block-level elements in the normal flow of the root element. User agents may also apply these properties to other elements, e.g., 'table-row' elements.

When a page break splits a box, the box's margins, borders, and padding have no visual effect where the split occurs.

13.3.2 Breaks inside elements: 'orphans', 'widows'

'orphans'
Value:  <integer> | inherit
Initial:  2
Applies to:  block container elements
Inherited:  yes
Percentages:  N/A
Media:  visual, paged
Computed value:  as specified
'widows'
Value:  <integer> | inherit
Initial:  2
Applies to:  block container elements
Inherited:  yes
Percentages:  N/A
Media:  visual, paged
Computed value:  as specified

The 'orphans' property specifies the minimum number of lines in a block container that must be left at the bottom of a page. The 'widows' property specifies the minimum number of lines in a block container that must be left at the top of a page. Examples of how they are used to control page breaks are given below.

Only positive values are allowed.

For information about paragraph formatting, please consult the section on line boxes.

13.3.3 Allowed page breaks

In the normal flow, page breaks can occur at the following places:

  1. In the vertical margin between block-level boxes. When an unforced page break occurs here, the used values of the relevant 'margin-top' and 'margin-bottom' properties are set to '0'. When a forced page break occurs here, the used value of the relevant 'margin-bottom' property is set to '0'; the relevant 'margin-top' used value may either be set to '0' or retained.
  2. Between line boxes inside a block container box.
  3. Between the content edge of a block container box and the outer edges of its child content (margin edges of block-level children or line box edges for inline-level children) if there is a (non-zero) gap between them.

Note: It is expected that CSS3 will specify that the relevant 'margin-top' applies (i.e., is not set to '0') after a forced page break.

These breaks are subject to the following rules:

If the above does not provide enough break points to keep content from overflowing the page boxes, then rules A, B and D are dropped in order to find additional breakpoints.

If that still does not lead to sufficient break points, rule C is dropped as well, to find still more break points.

13.3.4 Forced page breaks

A page break must occur at (1) if, among the 'page-break-after' and 'page-break-before' properties of all the elements generating boxes that meet at this margin, there is at least one with the value 'always', 'left', or 'right'.

13.3.5 "Best" page breaks

CSS 2.1 does not define which of a set of allowed page breaks must be used; CSS 2.1 does not forbid a user agent from breaking at every possible break point, or not to break at all. But CSS 2.1 does recommend that user agents observe the following heuristics (while recognizing that they are sometimes contradictory):

Example(s):

Suppose, for example, that the style sheet contains 'orphans: 4', 'widows: 2', and there are 20 lines (line boxes) available at the bottom of the current page:

Now suppose that 'orphans' is '10', 'widows' is '20', and there are 8 lines available at the bottom of the current page:

13.4 Cascading in the page context

Declarations in the page context obey the cascade just like normal CSS declarations.

Example(s):

Consider the following example:

@page {
  margin-left: 3cm;
}

@page :left {
  margin-left: 4cm;
}

Due to the higher specificity of the pseudo-class selector, the left margin on left pages will be '4cm' and all other pages (i.e., the right pages) will have a left margin of '3cm'.

dn是什么 1985年属牛是什么命 阳历一月份是什么星座 血症是什么病 蜂蜜有什么好处
经常生气会得什么病 胃镜是什么 梵蒂冈为什么没人敢打 跛行是什么意思 它是什么结构
玫瑰花可以和什么一起泡水喝 垚字是什么意思 农历今天属什么生肖 靶器官是什么意思 扭转乾坤什么意思
什么车最长脑筋急转弯 忘恩负义的负是什么意思 黄鼠狼吃什么 梅毒检查什么项目 母婴传播是什么意思
村书记是什么级别hcv9jop6ns7r.cn 宫颈出血是什么原因bysq.com 85属什么生肖zsyouku.com 卡地亚蓝气球什么档次hcv8jop7ns2r.cn 豆角长什么样luyiluode.com
日不落是什么意思wuhaiwuya.com 可塑性是什么意思beikeqingting.com 乐属于五行属什么hcv8jop5ns4r.cn 为什么脖子老是痒hcv7jop7ns3r.cn 一切唯心造是什么意思hcv9jop5ns7r.cn
梦见抓鸟是什么征兆hcv7jop6ns7r.cn 年检是什么意思hcv8jop2ns9r.cn 初秋的天冰冷的夜是什么歌hcv8jop2ns8r.cn 势利眼是什么意思hcv9jop7ns5r.cn 清朝为什么会灭亡hcv9jop4ns7r.cn
糖尿病人吃什么水果hcv9jop5ns9r.cn 三千年前是什么朝代hcv8jop1ns3r.cn 吃什么药头脑立刻清醒ff14chat.com 脾胃湿热吃什么药好travellingsim.com 试管什么方案好hcv8jop1ns3r.cn
百度