Div второго раздела содержит поля текстовой области для пользователей, чтобы дать ответ, а весь Div ограничен высотой 3 дюйма (из-за этой формы напечатана на 8,5 "x11". Визуально указать, когда содержимое переполнено?
Код: Выделить всё
div {
border: 1px solid #CCC;
background-color: #FFF;
margin-bottom: 1rem;
padding: 1rem;
width: 5in;
max-height: 3in;
}
.static-section {
display: grid;
overflow: hidden;
* {
margin-top: .5rem;
margin-bottom: .5rem
padding: .5rem;
}
}
textarea {
field-sizing: content;
}
< /code>
html < /p>
HEADER
This section is locked at a max 3 inches. I want the background color to be red if the anything makes this section overflow.
When this information starts to go off the screen (i.e., enabling overflow - which the scrollbars are being hidden by the static-section class), I want the background color of this div to change. This will provide a visual indication that the provided response is too long.
FOOTER
Подробнее здесь: https://stackoverflow.com/questions/795 ... rs-enables
Мобильная версия