overflow

書式 overflow:種類
対象ブロックレベル要素、置換要素
継承しない
初期値 visible
解説
内容がはみ出した場合の表示方法を指定します。以下のものが指定できます。
設定名内容
visibleはみだした部分を表示する
hiddenはみだした部分は表示しない
scroll はみだした場合、スクロールバーを表示する
auto自動
サンプルコード
<html>
<head>
<meta http-equiv="content-type" content="text/html;charset=utf-8">
<title>Sample</title>
<style type="text/css"><!--
body { margin:0px; }
.box1 { position:absolute;border:1px black solid;
left:10px;
top:10px;
width:300px;
height:100px;
overflow:scroll
}
--></style>
</head>
<body>
<img src="Default.png">
<div class="box1">Dashboard Sample Text 1<br>
Dashboard Sample Text 2<br>
Dashboard Sample Text 3<br>
Dashboard Sample Text 4<br>
Dashboard Sample Text 5<br>
Dashboard Sample Text 6<br>
Dashboard Sample Text 7<br>
Dashboard Sample Text 8<br>
Dashboard Sample Text 9<br>
</div>
</body>
</html>
実際のサンプルをダウンロード