Styl overflowY Vlastnost
Příklad
Posouvejte svisle, pokud text přesahuje oblast obsahu prvku:
document.getElementById("myDIV").style.overflowY = "scroll";
Definice a použití
Vlastnost overflowY určuje, co se má dělat s horním/spodním okrajem obsahu – pokud přeteče oblast obsahu prvku.
Tip: Použijte vlastnost overflowX k určení oříznutí na levém a pravém okraji.
Podpora prohlížeče
Property | |||||
---|---|---|---|---|---|
overflowY | Yes | Yes | Yes | Yes | Yes |
Syntax
Vraťte vlastnost overflowY:
object.style.overflowY
Nastavte vlastnost overflowY:
object.style.overflowY = "visible|hidden|scroll|auto|initial|inherit"
Hodnoty vlastností
Value | Description |
---|---|
visible | The content is not clipped, and it may be rendered outside the content box |
hidden | The content is clipped - and no scrolling mechanism is provided |
scroll | The content is clipped and a scrolling mechanism is provided |
auto | Should cause a scrolling mechanism to be provided for overflowing boxes |
initial | Sets this property to its default value. Read about initial |
inherit | Inherits this property from its parent element. Read about inherit |
Technické údaje
Výchozí hodnota: | viditelné |
---|---|
Návratová hodnota: | Řetězec představující vlastnost přetečení-y prvku |
Verze CSS | CSS3 |
Související stránky
CSS reference: vlastnost overflow-y
❮ Objekt stylu