2010-06-07 107 views

回答

2

一個div,將永遠留在頁面頂部所有的瀏覽器頁面的一個div(在這種情況下,爲5px從頂部):

CSS:

.mydiv { 
    position: absolute; 
    top: 5px; /* or however far you want it from the top of the page */ 
} 

HTML:

<div class="mydiv">this will always be 5px from the top of the page</div>