Css Style OECSPACE
Notice
About All
Css style Teaching
JavaScript Html
•Sp Cgi Download
Perl Teaching
Flash Teaching
Flash Download
Flash Material
Web Material
Cursor
Free board
Coolsite
Today : 214
Yesterday : 1201
Total : 1627575
W3C XHTML 1.0
W3C CSS
戰國策虛擬主機
Home
|
Copyright
|
Site map
|
Contact me
|
Search
| Online:5
CSS是Cascading Style Sheets的縮寫,我們中文稱為「串聯樣式表」
CSS Style簡介
CSS基礎運用
CSS基本樣式
文字樣式
項目符號
背景樣式
連結樣式
框線樣式
表單運用
邊界樣式
邊框空白
物件定位
相對位置
相對位置2
CSS技術運用
IE專用樣式
CSS串聯樣式表教學『標籤元素定位效果』
製作物件重疊效果必須加上
position
屬性:
position : static /* 無定位 */
position : relative /* 依物件左上角為基準點取相對位置 */
position : absolute /* 依網頁左上角為基準點取絕對位置 */
物件重疊運用範例
物件定位區塊運用
<style type="text/css">
<!--
.div{height:50px;width:150px;background:#399}
.tab{background:#c33;height:50px;width:150px}
.tabs{
position:relative;top:-20px;left:30px;
background:#f60;height:50px;width:150px}
-->
</style>
<div class="div">一般DIV標籤</div>
<div class="div">一般DIV標籤</div>
<div class="tab">DIV標籤用tab樣式無定位</div>
<div class="tabs">DIV標籤用tabs樣式加了定位</div>
一般DIV標籤
一般DIV標籤
DIV標籤用tab樣式無定位
DIV標籤用tabs樣式加了定位
物件定位表格運用
<table width="300px" height="50px" border="1"
style="position:relative;top:20px;left:20px"
>
<tr><td bgcolor="#0099cc">表格一 加了定位 </td></tr>
</table>
<table width="300px" height="50px" border="1"><tr>
<td bgcolor="#66ccff">表格二 沒有定位</td>
</tr></table>
表格一 加了定位 position:relative;top:20px;left:20px
表格二 沒有定位
XHTML1.0
|
CSS
| Copyright © 2001-2008 by OECSPACE