<!DOCTYPE html>
<html>
<head>
<meta charset="UTF-8">
<title></title>
<style type="text/css">
*{
margin: 0;
padding: 0;
list-style: none;
}
body{
background: #000000;
}
div{
width: 500px;
height: 200px;
border: solid 1px;
margin: 0 auto;
background: #ccc;
position: relative;
}
div ul{
width: 300px;
height: 200px;
margin: 0 auto;
}
div ul li{
padding-top: 20px;
font-size: 18px;
width: 80px;
height: 45px;
}
div ul li:hover{
background: #FFFFFF;
}
div .div3{
position: absolute;
left:144px;
top: 0;
width: 200px;
height: 200px;
background: yellow;
display: none;
}
</style>
</head>
<body>
<div>
<ul class="ul">
<li>手机
<div class="div3">
11111111
</div>
</li>
<li>电脑
<div class="div3">
22222222
</div>
</li>
<li>冰箱
<div class="div3">
33333333
</div>
</li>
</ul>
</div>
</body>
<script type="text/javascript" src="js/jquery-2.1.0.js" ></script>
<script>
$('.ul li').hover(function(){
$(this).find('div').show();
},function(){
$(this).find('div').hide();
})
</script>
<html>
<head>
<meta charset="UTF-8">
<title></title>
<style type="text/css">
*{
margin: 0;
padding: 0;
list-style: none;
}
body{
background: #000000;
}
div{
width: 500px;
height: 200px;
border: solid 1px;
margin: 0 auto;
background: #ccc;
position: relative;
}
div ul{
width: 300px;
height: 200px;
margin: 0 auto;
}
div ul li{
padding-top: 20px;
font-size: 18px;
width: 80px;
height: 45px;
}
div ul li:hover{
background: #FFFFFF;
}
div .div3{
position: absolute;
left:144px;
top: 0;
width: 200px;
height: 200px;
background: yellow;
display: none;
}
</style>
</head>
<body>
<div>
<ul class="ul">
<li>手机
<div class="div3">
11111111
</div>
</li>
<li>电脑
<div class="div3">
22222222
</div>
</li>
<li>冰箱
<div class="div3">
33333333
</div>
</li>
</ul>
</div>
</body>
<script type="text/javascript" src="js/jquery-2.1.0.js" ></script>
<script>
$('.ul li').hover(function(){
$(this).find('div').show();
},function(){
$(this).find('div').hide();
})
</script>
</html>
注:布局有点潦草,不太美观。