aboutsummaryrefslogtreecommitdiff
path: root/files/zh-cn/web/css/_colon_left
diff options
context:
space:
mode:
Diffstat (limited to 'files/zh-cn/web/css/_colon_left')
-rw-r--r--files/zh-cn/web/css/_colon_left/index.html75
1 files changed, 75 insertions, 0 deletions
diff --git a/files/zh-cn/web/css/_colon_left/index.html b/files/zh-cn/web/css/_colon_left/index.html
new file mode 100644
index 0000000000..12f951a000
--- /dev/null
+++ b/files/zh-cn/web/css/_colon_left/index.html
@@ -0,0 +1,75 @@
+---
+title: ':left'
+slug: 'Web/CSS/:left'
+tags:
+ - '@page'
+ - CSS
+ - Pseudo-class
+translation_of: 'Web/CSS/:left'
+---
+<div>{{ CSSRef() }}</div>
+
+<p><strong><code>:left</code></strong> <a href="/en-US/docs/Web/CSS">CSS</a> <a href="/zh-CN/docs/Web/CSS/Pseudo-classes">伪类</a>, 需要和<a href="/zh-CN/docs/Web/CSS/At-rule">@规则</a>  {{cssxref("@page")}} 配套使用, 对打印文档的左侧页设置CSS样式.</p>
+
+<pre class="brush: css no-line-numbers">/* 设置打印时的左侧文档样式 */
+@page :left {
+ margin: 2in 3in;
+}</pre>
+
+<p>打印文档的"左"或"右"是由书写方向相关的. 举个栗子, "从左到右"的书写方向中第一页应当使用 {{Cssxref(":right")}} 配置; "从右至左"的书写方向中第一页应当使用 <code>:left</code> 配置.</p>
+
+<div class="note">
+<p><strong>Note:</strong> 并不是所有样式属性都能应用在此选择器内. 仅仅 {{ Cssxref("margin") }}, {{ Cssxref("padding") }}, {{ Cssxref("border") }}, 和 {{ Cssxref("background") }} 等打印时需要的属性可以使用. 其他属性将直接忽略, 并且可以使用的属性也只会在打印时生效, 显示时不会生效.</p>
+</div>
+
+<h2 id="参数">参数</h2>
+
+<pre class="syntaxbox">{{csssyntax}}</pre>
+
+<h2 id="样例">样例</h2>
+
+<pre class="brush: css">@page :left {
+  margin: 2in 3in;
+}
+</pre>
+
+<h2 id="规范">规范</h2>
+
+<table class="standard-table">
+ <thead>
+ <tr>
+ <th scope="col">Specification</th>
+ <th scope="col">Status</th>
+ <th scope="col">Comment</th>
+ </tr>
+ </thead>
+ <tbody>
+ <tr>
+ <td>{{ SpecName('CSS3 Paged Media', '#left-right-first', ':left') }}</td>
+ <td>{{ Spec2('CSS3 Paged Media') }}</td>
+ <td>No change.</td>
+ </tr>
+ <tr>
+ <td>{{ SpecName('CSS2.1', 'page.html#page-selectors', ':left') }}</td>
+ <td>{{ Spec2('CSS2.1') }}</td>
+ <td>Initial definition.</td>
+ </tr>
+ </tbody>
+</table>
+
+<h2 id="浏览器兼容性">浏览器兼容性</h2>
+
+<p> </p>
+
+
+
+<p>{{Compat("css.selectors.left")}}</p>
+
+<p> </p>
+
+<h2 id="参考">参考</h2>
+
+<ul>
+ <li>{{ Cssxref("@page") }}</li>
+ <li>Other page-related pseudo-classes: {{ Cssxref(":first") }}, {{ Cssxref(":right") }}</li>
+</ul>