将鼠标悬停在某个地方可以显示隐藏的文本 [英] mousehover at a place can show hidden text

查看:140
本文介绍了将鼠标悬停在某个地方可以显示隐藏的文本的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我想要一个j查询,将鼠标放在某个地方可以显示隐藏的文本.

I want to an j-query, which on bringing mouse at a place can show hidden text. it is their in the twitter.

推荐答案

使用jQuery,这真的很容易.一种方法是按颜色隐藏.

假设您需要在某些HTML元素上玩这个技巧,例如div:
With jQuery, this is really easy. One of the ways would be hiding by color.

Suppose you need to play this trick on some HTML element, such as div:
<div id="textHider"><!- some content... -></div>



创建一些CSS样式以隐藏内容,例如:



Create some CSS style to hide the content, such as:

.hiddenText { background-color:yellow; color:yellow; }





myElement =


(" ); className = " ; myElement.addClass(className); // 隐藏 myElement.hover( function(){// 关于鼠标指针进入元素区域
("#textHider"); className = "hiddenText"; myElement.addClass(className); //hide myElement.hover( function() { //on mouse pointer getting in the element area


().removeClass(className); // 显示 }, function(){// 关于鼠标指针熄灭
(this).removeClass(className); //show }, function() { //on mouse pointer going out


这篇关于将鼠标悬停在某个地方可以显示隐藏的文本的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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