87,992
社区成员
发帖
与我相关
我的任务
分享
<!DOCTYPE html>
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title></title>
<style>
html, body {
margin: 0;
height: 100%;
}
.column {
width: 200px;
height: 100%;
overflow: hidden;
border: 1px black solid;
display: inline-block;
}
iframe {
width: 100%;
height: 100%;
overflow: auto;
border: 0;
}
#msg {
display: none;
width: 250px;
height: 100px;
border: 3px #ff6a00 solid;
background-color: white;
font-size: 20pt;
position: absolute;
}
</style>
</head>
<body style="position: relative;">
<div class="column">
<iframe src="online.html"></iframe>
</div>
<div class="column">
<iframe src="content.html"></iframe>
</div>
<div id="msg"></div>
</body>
</html>
<script src="../../../Script/jquery-1.7.2.min.js"></script>
<script>
function showtip(obj) {
$('#msg').html($(obj).html())
.css({
top: $(obj).offset().top - $(obj).closest('body').scrollTop() + 'px',
left: $(obj).offset().left + 'px'
}).show();
}
function hidetip() {
$('#msg').hide();
}
</script>
<!DOCTYPE html>
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8"/>
<title></title>
<style>
.item{
margin:10px;
width:150px;
height:150px;
background-color:gray;
border:1px green solid;
}
</style>
</head>
<body>
<div class="item" onmouseover="parent.showtip(this);" onmouseout="parent.hidetip();">item1</div>
<div class="item" onmouseover="parent.showtip(this);" onmouseout="parent.hidetip();">item2</div>
<div class="item" onmouseover="parent.showtip(this);" onmouseout="parent.hidetip();">item3</div>
<div class="item" onmouseover="parent.showtip(this);" onmouseout="parent.hidetip();">item4</div>
<div class="item" onmouseover="parent.showtip(this);" onmouseout="parent.hidetip();">item5</div>
</body>
</html>