문제

Quick question:

Can I enable website preview on all of the links in my web page?
i.e. when the user moves the mouse over any link in the page, I want to show a simple popup window which loads the page in link.

If it's important, I'm using Asp.net

도움이 되었습니까?

해결책

You can use an iframe tag to display another page.

    <iframe src="http://www.example.com"></iframe>

Your HTML

 <a class="tiptext">A link
 <iframe class="description" src="http://www.example.com"></iframe>
 </a>

Your CSS

.tiptext {
    color:#069; 
    cursor:pointer;
}
.description {
    display:none;
    position:absolute;
    border:1px solid #000;
    width:400px;
    height:400px;
}

Your JS

$(".tiptext").mouseover(function() {
    $(this).children(".description").show();
}).mouseout(function() {
    $(this).children(".description").hide();
});

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

라이센스 : CC-BY-SA ~와 함께 속성
제휴하지 않습니다 StackOverflow
scroll top