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