aboutsummaryrefslogtreecommitdiff
path: root/files/zh-cn/web/css/_colon_right
diff options
context:
space:
mode:
authorPeter Bengtsson <mail@peterbe.com>2020-12-08 14:40:17 -0500
committerPeter Bengtsson <mail@peterbe.com>2020-12-08 14:40:17 -0500
commit33058f2b292b3a581333bdfb21b8f671898c5060 (patch)
tree51c3e392513ec574331b2d3f85c394445ea803c6 /files/zh-cn/web/css/_colon_right
parent8b66d724f7caf0157093fb09cfec8fbd0c6ad50a (diff)
downloadtranslated-content-33058f2b292b3a581333bdfb21b8f671898c5060.tar.gz
translated-content-33058f2b292b3a581333bdfb21b8f671898c5060.tar.bz2
translated-content-33058f2b292b3a581333bdfb21b8f671898c5060.zip
initial commit
Diffstat (limited to 'files/zh-cn/web/css/_colon_right')
-rw-r--r--files/zh-cn/web/css/_colon_right/index.html71
1 files changed, 71 insertions, 0 deletions
diff --git a/files/zh-cn/web/css/_colon_right/index.html b/files/zh-cn/web/css/_colon_right/index.html
new file mode 100644
index 0000000000..d5e0a7c9c8
--- /dev/null
+++ b/files/zh-cn/web/css/_colon_right/index.html
@@ -0,0 +1,71 @@
+---
+title: ':right'
+slug: 'Web/CSS/:right'
+translation_of: 'Web/CSS/:right'
+---
+<p><strong><code>:right</code></strong> <a href="/zh-CN/docs/Learn/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")}} 一起配套使用,表示打印文档的所有右页。</p>
+
+<pre class="brush: css no-line-numbers">/* 当打印时会选择所有文档右页 */
+@page :right {
+ margin: 2in 3in;
+}</pre>
+
+<p>这里的“左” 或 “右” 不是固定的,取决与文档的写作方向。如果第一页主要文字方向是从左到右的,那么它就是{{cssxref(":right")}}右页,反之它就是{{cssxref(":left")}}左页。</p>
+
+<div class="blockIndicator note">
+<p>Note: 可通过 <code>bdo</code> 标签  的 <code>dir</code> 属性改变文字方向。</p>
+</div>
+
+<div class="note">
+<p><strong>Note:</strong> 此伪类只能用于更改页面的 {{ cssxref("margin") }}, {{cssxref("padding") }}, {{ cssxref("border") }}, and {{cssxref("background") }} 属性。其它属性都将被忽略,只会影响页框,不会影响文档内容。 </p>
+</div>
+
+<h2 id="语法">语法</h2>
+
+<pre class="syntaxbox">@page:right{
+ margin: * *;
+}</pre>
+
+<h2 id="示例">示例</h2>
+
+<pre class="brush: css">@page :right {
+ 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', ':right') }}</td>
+ <td>{{ Spec2('CSS3 Paged Media') }}</td>
+ <td>无改变。</td>
+ </tr>
+ <tr>
+ <td>{{ SpecName('CSS2.1', 'page.html#page-selectors', ':right') }}</td>
+ <td>{{ Spec2('CSS2.1') }}</td>
+ <td>初步定义。</td>
+ </tr>
+ </tbody>
+</table>
+
+<h2 id="浏览器兼容性">浏览器兼容性</h2>
+
+<p class="hidden">这个页面上的兼容性表格是由结构化数据产生的,但是现在我们的数据还有些不足。如果你想要贡献你的兼容性数据,请访问 <a href="https://github.com/mdn/browser-compat-data">https://github.com/mdn/browser-compat-data</a> 并且给我们发送Pull request。</p>
+
+<p>{{Compat("css.selectors.right")}}</p>
+
+<h2 id="参考">参考</h2>
+
+<ul>
+ <li>{{ cssxref("@page") }}</li>
+ <li>Other page-related pseudo-classes: {{ cssxref(":first") }}, {{ cssxref(":left") }}</li>
+</ul>