在CSS/JS中:鼠标悬停(悬停)上的链接显示h1中的内容 [英] in css/js: make links on mouse over (hover) shows what is in h1

查看:40
本文介绍了在CSS/JS中:鼠标悬停(悬停)上的链接显示h1中的内容的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有一个css文件,我想将其添加到链接选项中,以使它们抓住并显示链接页面上的第一个h1标签,并在鼠标悬停在链接上时显示该标签(作为标题,或替代文字).(或如何使用中央javascript文件?

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?

示例: http://en.wikipedia.org/wiki/Main_Page 该页面上的任何链接都显示链接页面的标题.

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

推荐答案

除非我遗漏了您的问题,否则您只是在谈论常规的HTML Title属性.至少在您的示例页面上,这就是所有正在发生的事情-链接具有标题.

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.

这篇关于在CSS/JS中:鼠标悬停(悬停)上的链接显示h1中的内容的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆