From 074785cea106179cb3305637055ab0a009ca74f2 Mon Sep 17 00:00:00 2001 From: Peter Bengtsson Date: Tue, 8 Dec 2020 14:42:52 -0500 Subject: initial commit --- files/ru/web/css/orphans/index.html | 117 ++++++++++++++++++++++++++++++++++++ 1 file changed, 117 insertions(+) create mode 100644 files/ru/web/css/orphans/index.html (limited to 'files/ru/web/css/orphans') diff --git a/files/ru/web/css/orphans/index.html b/files/ru/web/css/orphans/index.html new file mode 100644 index 0000000000..89b79dc9d2 --- /dev/null +++ b/files/ru/web/css/orphans/index.html @@ -0,0 +1,117 @@ +--- +title: orphans +slug: Web/CSS/orphans +tags: + - Верстка + - печать + - разрыв страницы + - фрагментация +translation_of: Web/CSS/orphans +--- +
{{CSSRef}}
+ +

Свойство CSS orphans устанавливает минимальное число строк в блочном контейнере, которое должно быть показано внизу страницы, региона или столбца.

+ +
/* <integer> значения */
+orphans: 2;
+orphans: 3;
+
+/* Глобальные значения */
+orphans: inherit;
+orphans: initial;
+orphans: unset;
+ +
+

В типографии, orphan это первая линия абзаца, которая отображается внизу страницы. (Абзац продолжается на следующей странице.)

+
+ +

{{cssinfo}}

+ +

 

+ +

Синтаксис

+ +

Значения

+ +
+
{{cssxref("<integer>")}}
+
Минимальное число строк, которое можно оставить внизу фрагмента перед разрывом фрагмента. Значение должно быть положительным.
+
+ +

Формальный синтаксис

+ +
{{csssyntax}}
+ +

Пример

+ +

HTML

+ +
<div>
+  <p>This is the first paragraph containing some text.</p>
+  <p>This is the second paragraph containing some more text than the first one. It is used to demonstrate how widows work.</p>
+  <p>This is the third paragraph. It has a little bit more text than the first one.</p>
+</div>
+ +

CSS

+ +
div {
+  background-color: #8cffa0;
+  height: 150px;
+  columns: 3;
+  orphans: 3;
+}
+
+p {
+  background-color: #8ca0ff;
+}
+
+p:first-child {
+  margin-top: 0;
+}
+ +
 
+ +

Результат

+ +

{{EmbedLiveSample("Example", 380, 150)}}

+ +
 
+ +

Спецификации

+ + + + + + + + + + + + + + + + + + + + + +
СпецификацияСтатусКомментарий
{{SpecName('CSS3 Fragmentation', '#widows-orphans', 'orphans')}}{{Spec2('CSS3 Fragmentation')}}Расширяет orphans для применения в любых фрагментах, включая страницы, регионы и столбцы.
{{SpecName('CSS2.1', 'page.html#break-inside', 'orphans')}}{{Spec2('CSS2.1')}}Первое определение.
+ +

Поддержка браузерами

+ +
+ + +

{{Compat("css.properties.orphans")}}

+
+ +

Смотрите также

+ + -- cgit v1.2.3-54-g00ecf