goTOP
December 3, 2014

CSS 固定在網頁上方或下方的語法

| |
網頁語言 » CSS | 閱覽(5998) | Posted by apao at 14:45
固定在上方的寫法

<html>
<head>

<style type='text/css'>
#bTop{ position:fixed; top:0px;}
</style>

</head>
<body>

<div id="bTop">
這裡是 bTop !!!
</div>

</body>
</html>

備註:上方會有少了與#bHeader 相同空間。


固定在下方的寫法

<html>
<head>

<style type='text/css'>
#bFooter { position:fixed; bottom:0px; }
</style>

</head>
<body>

<div id="bFooter">
這裡是 bFooter !!!
</div>

</body>
</html>

備註:下方會少了與#footer 相同空間。

參考網頁
http://goo.gl/ogSrPu
Facebook twitter LINEk
文章来自: 本站原創
0 Comment(s)
我要發表評論
暱稱
密碼 [ 訪客無需密碼 ]
電郵
網址
開啟HTML 開啟UBB 開啟表情 隱藏 記住我