日期:2014-05-17 浏览次数:20679 次
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<title>MyHtml.html</title>
<meta http-equiv="keywords" content="keyword1,keyword2,keyword3">
<meta http-equiv="description" content="this is my page">
<meta http-equiv="content-type" content="text/html; charset=UTF-8">
<!--<link rel="stylesheet" type="text/css" href="./styles.css">-->
<style type="text/css">
.outer:hover .inner{
display: none;
}
</style>
</head>
<body>
<div class="outer" >
鼠标滑过这里的时候
<div class="inner">这里为什么当鼠标滑过不隐藏呢?</div>
</div>
</body>
</html>
<script src="JS/jquery-1.7.1.min.js"></script>
<script>
$(function () {
$(".outer").hover(function () {
$(this).find(".inner").hide();
}, function () {
$(this).find(".inner").show();
});
});