搜尋 Mozilla 技術支援網站

防止技術支援詐騙。我們絕對不會要求您撥打電話或發送簡訊,或是提供個人資訊。請用「回報濫用」功能回報可疑的行為。

了解更多

Can I change the location of alt text to that it is not direclty under the mouse pointer?

  • 4 回覆
  • 1 有這個問題
  • 13 次檢視
  • 最近回覆由 hydrohead

more options

I read a few comics that have punchlines and other messages in the alt text or hover text. Firefox puts the alt text directly underneath the mouse pointer making the first word or two hard to read. If I move the pointer more than just the most tiny bit, the alt text goes away. The attached image shows what I mean by alt text or hover text. Unfortunately, it does not show the mouse pointer.

Is there a way to get the alt text to show up next to the mouse pointer instead of directly underneath it?

I read a few comics that have punchlines and other messages in the alt text or hover text. Firefox puts the alt text directly underneath the mouse pointer making the first word or two hard to read. If I move the pointer more than just the most tiny bit, the alt text goes away. The attached image shows what I mean by alt text or hover text. Unfortunately, it does not show the mouse pointer. Is there a way to get the alt text to show up next to the mouse pointer instead of directly underneath it?
附加的畫面擷圖

所有回覆 (4)

more options

Hi, sorry that is not possible to do do.

more options

To be a bit pedantic, the tooltip shows the content of the title attribute; Firefox stubbornly refuses to show the content of the alt attribute in a tooltip, unlike other browsers.

<img src="//imgs.xkcd.com/comics/lightning_distance.png" title="The index of radio refraction does have a lot of variation, which might throw off your calculations, so you can also look at the difference in brightness between the visible flash and more-attenuated UV and x-rays." alt="Lightning Distance" srcset="//imgs.xkcd.com/comics/lightning_distance_2x.png 2x">

But I digress.

There's no built-in feature to move tooltips, and usually it's desirable to have it near the mouse pointer, so probably you would need some special handling for the sites where this is a problem.

It's possible, using CSS, to generate a display of attribute content adjacent to an element in a page -- you may have noticed URLs after links in printouts, as an example -- but it doesn't work for inline images, so some kind of scripting probably is needed. For example, removing the title attribute from the image and popping it into a "spoiler" element below or to the right of the image that you can read by hovering it.

I wonder if anyone has posted a solution for it out on the web somewhere?

由 jscher2000 - Support Volunteer 於 修改

more options

If I move the mouse in from the right side or the bottom then the tooltip stays outside of the comic for me if that is what you want to achieve.

more options

jscher2000 - HaHa, I don't understand what you said.

cor-el- I don't care about the relationship of the hover text to the image, just relationship of the hover text to the mouse pointer. The pointer is covering up the text. Now, I do want to know how you got white text on a black background for your hover text?