链接悬停时的预览页面

MBZ*_*MBZ 2 html asp.net popup hyperlink hover

快速提问:

我可以在网页上的所有链接上启用网站预览吗?
即,当用户将鼠标移到页面中的任何链接上时,我想显示一个简单的弹出窗口,该页面将页面加载到链接中。

如果重要的话,我正在使用Asp.net

Mr *_*oss 7

您可以使用iframe标签显示另一个页面。

    <iframe src="http://www.example.com"></iframe>
Run Code Online (Sandbox Code Playgroud)

您的HTML

 <a class="tiptext">A link
 <iframe class="description" src="http://www.example.com"></iframe>
 </a>
Run Code Online (Sandbox Code Playgroud)

您的CSS

.tiptext {
    color:#069; 
    cursor:pointer;
}
.description {
    display:none;
    position:absolute;
    border:1px solid #000;
    width:400px;
    height:400px;
}
Run Code Online (Sandbox Code Playgroud)

你的JS

$(".tiptext").mouseover(function() {
    $(this).children(".description").show();
}).mouseout(function() {
    $(this).children(".description").hide();
});
Run Code Online (Sandbox Code Playgroud)

JSFiddle:http : //jsfiddle.net/yboss/q29tP/