use*_*475 1 html css jquery hover css3
你如何将鼠标悬停在一个单词上,右边它会显示更多的单词?
<div id="footer">
<center>
<p>Copyright 2014</p>
</center>
<center><a href="http://www.scriptiny.com/2010/09/fading-slideshow-script/" style="position:absolute; margin-top:20px; margin-left:-35px; text-decoration:none; color:gray; z-index:20;">Tinyfader.js</a> <p style=" margin-top:-38px;padding-top:20px; padding-left:572px; opacity:0; color:red; ">Released under Creative Commons License</p>
<center><a href="http://jquery.org/license" style="position: absolute; text-decoration:none; color:gray; margin-top:0px; margin-left:-50px; z-index:20;">Jquery-1.5.min.js</a> <p style="margin-top:-20px; padding-left:642px; opacity:0; color:red;">Dual licensed under the MIT or GPL Version 2 licenses</p>
<center><a href="http://jquery.org/license" style="position: absolute; text-decoration:none; color:gray; margin-top:0px; margin-left:-80px; z-index:20;">Jquery-ui-1.8.9.custom.min.js</a><p style="margin-top:-20px; padding-left:642px; opacity:0; color:red;">Dual licensed under the MIT or GPL Version 2 licenses</p>
<center><p style="margin-top:-18px;"><a href="http://sizzlejs.com/" style="position: absolute; text-decoration:none; color:gray; margin-top:-2px; margin-left:-25px; z-index:20;">Sizzle.js</a></center><p style="margin-top:-16px; padding-left:615px; opacity:0; color:red;">Released under the MIT, BSD, and GPL Licenses.</p>
</div>
</div>
Run Code Online (Sandbox Code Playgroud)
Jas*_*son 10
使用CSS很容易.这是一个小提琴演示.
HTML:
<p>My main text <span class="extra">My hidden text!</span></p>
Run Code Online (Sandbox Code Playgroud)
CSS:
.extra {
display: none;
}
p:hover .extra {
display: inline-block;
}
Run Code Online (Sandbox Code Playgroud)
这里有一些你可能会感兴趣和有用的东西,虽然它并不完全符合你的要求.您可以title向元素添加属性,以便以某种工具提示方式显示文本.如果你只想要一个单词,你会想要绕过它.
<p title="Here I am to save the day!">Superman</p>
Run Code Online (Sandbox Code Playgroud)