标签:style color sp div on html ad bs htm
div1包含div2和div3
div3 div2同时浮动到最右边.
div3 不显示
设置鼠标触动效果
当鼠标触动事件,显示div3,
同时把div2挤到左边。
<!DOCTYPE html>
<html>
<head>
<title></title>
<style type="text/css">
.div1
{
height: 50px;
width: 300px;
background-color: yellow;
}
.div1:hover .div3{
display: block;
}
.div2
{
width: 100px;
background-color: red;
height: 50px;
float: right;
}
.div3
{
width: 100px;
background-color: blue;
height: 50px;
float: right;
display: none;
}
</style>
</head>
<body>
<div class="div1">
<div class="div3">3</div>
<div class="div2">2</div>1
</div>
</body>
</html>
标签:style color sp div on html ad bs htm
原文地址:http://www.cnblogs.com/chenjiren0109/p/4027737.html