Re: [請問] 火狐有無滑鼠移到圖上顯示原始大小的套件

看板Browsers (瀏覽器)作者 (批踢踢特偵組)時間14年前 (2012/02/19 17:01), 編輯推噓4(401)
留言5則, 3人參與, 最新討論串2/2 (看更多)
剛剛試出一種方式可以達到我要的效果,貼在這供有需要的人使用 首先將以下打在記事本中 img:hover{ width: auto !important; height: auto !important; } 儲存為 usercontent.css 放到 C:\Documents and Settings\帳戶名稱\Application Data\Mozilla\ Firefox\Profiles\隨機的字串.default\chrome 裡面 然後重新開啟 Firefox 即可 測試網頁:http://bit.ly/ekbKxp (中間那個火狐的圖案是縮圖) PS: 我對css不熟,不知道這css會不會在特殊情況下出現bug -- 大一:「什麼!下禮拜要考試?」 大二:「什麼!明天要考試?」 大三:「什麼!下節課要考試?」 大四:「什麼!剛剛那節考試?」 -- ※ 發信站: 批踢踢實業坊(ptt.cc)

02/19 18:03, , 1F
副作用是會破壞排版 也可能會被其他樣式切掉 無法完整顯示
02/19 18:03, 1F
會被其他樣式切掉的問題有待高手改良 Orz....

02/19 21:31, , 2F
1. 加 z-index;2. 用 position: fixed
02/19 21:31, 2F
謝謝二樓,不過我發現加上fixed後,游標在圖上移動會狂閃,如果只加z-index,而沒有 fixed則還是會有被遮住的情況....orz img:hover { width: auto !important; height: auto !important; position: fixed; z-index: 1000; }

02/20 07:01, , 3F
原po試驗的結果讓我想到以前特定網頁會有的游標閃爍情況
02/20 07:01, 3F

02/20 07:02, , 4F
看來就是css內加了position:fixed............囧rz
02/20 07:02, 4F
主要應該是因為 hover 的關係,所以圖片才會因為滑鼠一直閃爍吧? ... orz ※ 編輯: ho2002 來自: 59.121.156.97 (02/20 13:23)

02/22 00:05, , 5F
position:fixed更容易破壞排版
02/22 00:05, 5F
文章代碼(AID): #1FGBfyTZ (Browsers)
文章代碼(AID): #1FGBfyTZ (Browsers)