三欄式帶捲軸自動伸展的DIV+CSS布局樣本

來源:互聯網
上載者:User

自動調整效果.

以下是代碼:
<html>
<head>
<title>Nice and Free CSS Template 3</title>
<style type="text/css" media="screen"><!--
/*  body und schrift deffinitionen */
html {
padding:0px;
margin:0px;
}
body {
background-color: #e1ddd9;
font-size: 12px;
font-family: Verdana, Arial, SunSans-Regular, Sans-Serif;
color:#564b47;
padding:0px;
margin:0px;
}
a {
color: #ff66cc;
font-size: 11px;
background-color:transparent;
text-decoration: none;
}
pre {
color: #564b47;
font-size: 11px;
background-color: #e1ddd9;
font-family: Courier, Monaco, Monospace;
}
p,h1, h3, pre {
padding: 5px 15px;
margin: 0px;
}
h3 {
font-size: 13px;
text-transform:uppercase;
color: #564b47;
background-color: transparent;
}
/*  positioning-layers dynamisch */
#logo {
position: absolute;
right: 2%;
width: 96%;
text-align: right;
top: 20px;
}
#left {
position: absolute;
left: 2%;
width: 22%;
top: 106px;
background-color: #ffffff;
}
#content {
position: absolute;
left: 25%;
width: 50%;
top: 106px;
background-color: #ffffff;
overflow: auto;
}
#right {
position: absolute;
left: 76%;
width: 22%;
top: 106px;
background-color: #ffffff;
overflow: auto;
}
#right, #content, #left {
border: 1px solid #564b47;
padding:0px;
margin:0px;
}
--></style>
</head>
<body>
<div id="left">
<h3>left</h3>
<pre>
#left {
position: absolute;
left: 2%;
width: 22%;
top: 106px;
background-color: #ffffff;
}
</pre>
<h3>Attention</h3>
<p>These pages use certain CSS definitions that are unsupported by older browsers.<br />
<a href="/">more nice and free css templates</a></p>
<p>
<img src="xhtml10.gif" alt="" width="80" height="15" border="0"/><br/>
<img src="css.gif" alt="css" width="80" height="15" border="0"/><br />
</p>
<br />
<br />
</div>
<div id="content">
<h3>middle right</h3>
<pre>
#content {
position: absolute;
left: 25%;
width: 50%;
top: 106px;
background-color: #ffffff;
overflow: auto;
}
</pre>
<h3>overflow: auto;</h3>
<p>With overflow: auto;
With overflow: you can determine how overflowing content should be treated.</p>
<h3>Values</h3>
<pre>
visible = The element gets expanded to show the entire content.
hidden  = The content will be cut if it overflows.
scroll  = The browser should offer scroll bars.
auto    = The browser should decide how to render the element. Scroll bars are allowed.
</pre>
<p>Older browsers do not know support this property.<br />
IE does not support overflow:visible</p>
<br />
<br />
</div>
<div id="right">
<h3>right</h3>
<pre>
#right {
position: absolute;
left: 76%;
width: 22%;
top: 106px;
background-color: #ffffff;
overflow: auto;
}
</pre>
<h3>open code</h3>
<p>Use of this code encouraged! (o_.)/</p>
<br />
<br />
</div>
</body>
</html>

以下是HTML指令碼特效代碼,點擊運行按鈕可查看效果:
[Ctrl+A 全部選擇 提示:你可先修改部分代碼,再按運行]

聯繫我們

該頁面正文內容均來源於網絡整理,並不代表阿里雲官方的觀點,該頁面所提到的產品和服務也與阿里云無關,如果該頁面內容對您造成了困擾,歡迎寫郵件給我們,收到郵件我們將在5個工作日內處理。

如果您發現本社區中有涉嫌抄襲的內容,歡迎發送郵件至: info-contact@alibabacloud.com 進行舉報並提供相關證據,工作人員會在 5 個工作天內聯絡您,一經查實,本站將立刻刪除涉嫌侵權內容。

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.