<a href="#" id="magic"
title="This is my sample.">
Hover over this text</a>
<script>
$('#magic').hover(function () { $(this).show('title') } );
</script>
当用户在文本上悬停时,我试图在标签旁边的标签中显示标题
答案 0 :(得分:0)
使用此代码仅适用于HTML / CSS
<a href="#" id='myA' title='this is title'> this is text</a>
这种风格:
#myA:hover:after{
content:attr(title);
color:red
}