in css/js: make links on mouse over (hover) shows what is in h1

六眼飞鱼酱① 提交于 2021-02-10 18:15:00

问题


I have a css file that I want to add to an option for links, to make them grab and show the first h1 tag from the linked page, and display it when the mouse is hovered over the link (as a title, or alt text). (or how to do it with a central javascript file?

Example: http://en.wikipedia.org/wiki/Main_Page any link in that page, shows the title of the linked page.


回答1:


Unless I'm missing something to your question, you're just talking about the regular HTML Title attribute. At least, on your example page, that's all that is happening - the links have titles.



来源:https://stackoverflow.com/questions/12623157/in-css-js-make-links-on-mouse-over-hover-shows-what-is-in-h1

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!