诱人的老师中文字幕在线观看
遊客:  註冊 | 登錄 | 幫助





標題: [求助] something about about css
ditt     Rank: 3
青出藍
性別 男
UID 334

精華 0
帖子 154
積分 317   詳情

閱讀權限 40
註冊 2006-6-29
來自
狀態 離線

 
 
 
 
發表於 2006-7-10 06:08 AM  資料  個人空間  短訊  加為好友 
something about about css

X-Seek
此 X-Seek 主題價值 20 XS。 (天藍出手)
X-Seek 出題者 ditt 希望能在 2006-7-17 06:08 AM 前尋找到解決方案。
已於 2006-7-25 11:11 AM 由 ditt 選出最合適的解決方案及關閉 X-Seek 主題。

Hi all,
I have question about that little navigation thingy. It scrolls up & down with the viewer. And it's on the top of the tables.
Is it a css layer? or a centre div tag with auto margin up & down?
You can see I dont even know what's the different between div tag & css layer...
I can only use css in Dreamweaver, cannot hand code...
I'm a css newbie
Thanks in advance




[ 觀看解決方案 ]


最後編輯: mickeyGoUp : 2006-7-11 11:00 PM
頂部

mickeyGoUp     Rank: 7Rank: 7Rank: 7
版主
性別 男
UID 5

精華 0
帖子 35511
積分 5235   詳情

閱讀權限 150
註冊 2006-3-24
來自 美國滴滴尼
狀態 離線

 
 
 
 
發表於 2006-7-12 07:58 PM  資料  個人空間  短訊  加為好友 
It should be a div that use javascript to set a timer to adjust the x-y position accordingly.

Because not all browsers support div, some browsers use the layer tag.

Just think of the layer/div as a place holder, and you can use css to style it (border, bgcolor, background-image, font size...etc.).  The properties (style, size, position...etc.) won't change by itself.  So we need to use javascript to make it dynamic.  It can be event driven (onclick, onmouseover...etc.), or we can set a timer so every 0.1 seconds, it will run some javascripts.  

In your case, I think a common way to do it is to set a timer to check the layer/div position and make sure it is always, for example, 20px away from the right of the browser screen, and 200px away from the top.  The timer can be set to every 0.1 second, so it is fast enough that when the user scroll, the menu follows.

And it is always on the top because after we set the css style to use absolute position, then it is on the top of the other regular elements.  And if you have more "layers" that are set to  absolute position, then I think it is the 'z-index' property that determines which one is above and which is below.

Please correct me if I was wrong.  Hope that answers your question.  




X-Seek 解決方案 1/1   


最後編輯: mickeyGoUp : 2006-7-12 08:01 PM
頂部



ditt     Rank: 3
青出藍
性別 男
UID 334

精華 0
帖子 154
積分 317   詳情

閱讀權限 40
註冊 2006-6-29
來自
狀態 離線

 
 
 
 
發表於 2006-7-13 09:42 AM  資料  個人空間  短訊  加為好友 


QUOTE:
原帖由 mickeyGoUp 於 2006-7-12 07:58 PM 發表
It should be a div that use javascript to set a timer to adjust the x-y position accordingly.

Because not all browsers support div, some browsers use the layer tag.

Just think of the layer/di ...

whoa!! you are the expert !!!! thank you so much 巴打 !!!!

頂部

快速美言
           


當前時區 GMT+8, 現在時間是 2024-11-27 07:13 AM

    Powered by Discuz!  © 2001-2007 Comsenz Inc.   
Processed in 0.012604 second(s), 9 queries

清除 Cookies - 聯繫我們 - LIPS Corner 新天藍 - Archiver