</p><p>Вибери потрібне значення для <code>page-break-before</code>:</p>
<p><strong>Ця властивість може не підтримуватися Вашим браузером!</strong></p>
<p><em>Ця властивість впливає на елементи тільки під-час друку документа!</em></p>
<div class="inputs">
<input id="auto" checked name="page-break-before" type="radio"/>
<label for="auto">auto</label>
<message for="auto">Ні вказує, ні забороняє переривання сторінки або стовпця.</message>
<input id="avoid" name="page-break-before" type="radio"/>
<label for="avoid">avoid</label>
<message for="avoid">Уникання переривання сторінки перед основним контейнером.</message>
<input id="always" name="page-break-before" type="radio"/>
<label for="always">always</label>
<message for="always">Завжди додає розрив сторінки перед елементом.</message>
<input id="left" name="page-break-before" type="radio"/>
<label for="left">left</label>
<message for="left">Пропускає одну або дві сторінки перед елементом, щоб наступна сторінка при друку була парною</message>
<input id="right" name="page-break-before" type="radio"/>
<label for="right">right</label>
<message for="right">Пропускає одну або дві сторінки перед елементом, щоб наступна сторінка при друку була непарною.</message>
</div>
<p id="message">Ні вказує, ні забороняє переривання сторінки або стовпця.</p>
<hr>
<div class="multicol">
<h3 id="block">Заголовок</h3>
<p>Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod
tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam,
quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo
consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse
cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non
proident, sunt in culpa qui officia deserunt mollit anim id est laborum.</p>
<p>А це ще просто текст, не звертайте уваги на нього...</p>
</div>
* {
box-sizing: border-box;
padding: 0;
}
body {
font-family: momospace;
font-size: 17px;
line-height: 1.5;
color: #222;
}
p, h4 {
margin-top: 0;
}
#form {
padding: 8px 16px;
font-size: 19px;
}
.multicol {
background-color: lightyellow;
padding: 10px;
/* Safari and Chrome */
-webkit-column-count: 3;
-webkit-column-rule: 2px dotted coral;
/* Firefox */
-moz-column-count: 3;
-moz-column-rule: 2px dotted coral;
/* CSS3 */
column-count: 3;
column-rule: 2px dotted coral;
}
#block {
page-break-before: auto;
}
#text {
height: 60px;
background-color: #eee;
padding: 16px 0;
}
message {
display: none;
}
var $message = $('#message');
$('.inputs').find('input').on('change', function() {
var $messageText = $("message[for='"+$(this).attr('id')+"']")
$message.text($messageText.text());
$('#block').css('page-break-before', $(this).attr('id'));
});
This Pen doesn't use any external CSS resources.