スタイルoverflowYプロパティ
例
テキストが要素のコンテンツ領域をオーバーフローした場合は、垂直方向にスクロールします。
document.getElementById("myDIV").style.overflowY = "scroll";
定義と使用法
overlayYプロパティは、コンテンツの上端/下端をどのように処理するかを指定します-要素のコンテンツ領域をオーバーフローした場合。
ヒント:overflowXプロパティを使用して、左端と右端のクリッピングを決定します。
ブラウザのサポート
Property | |||||
---|---|---|---|---|---|
overflowY | Yes | Yes | Yes | Yes | Yes |
構文
overlayYプロパティを返します。
object.style.overflowY
overlayYプロパティを設定します。
object.style.overflowY = "visible|hidden|scroll|auto|initial|inherit"
プロパティ値
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 |
技術的な詳細
デフォルト値: | 見える |
---|---|
戻り値: | 要素のoverflow-yプロパティを表す文字列 |
CSSバージョン | CSS3 |
関連ページ
CSSリファレンス:overflow-yプロパティ
❮スタイルオブジェクト