<style>
.index_b1{
width:1440px;
height:768px;
text-align:center;
margin:auto;
background:red;
position:relative;
}
.index_b3{
width:1440px;
height:768px;
text-align:center;
background:blue;/*现在是盒子3套了盒子2,所以显示肯定是错误的*/
position:relative;
}
.index_b2{
width:884px;
height:347px;
text-align:center;
background:yellow;
position:absolute;
top:200px;
left:278px;
}</style>
</head>
<body>
<div class="index_b1">
<div class="index_b2">
</div>
<div class="index_b3">
</div>
</div>非得使用嵌套的HTML格式吗?
这样把2和3使用兄弟元素,使用定位可以实现你的要求的,我这里把背景改成了颜色。而你说的那个按钮效果,可以使用定位热点实现吧。也是基于定位的。
.index_b1{
width:1440px;
height:768px;
text-align:center;
margin:auto;
background:red;
position:relative;
}
.index_b3{
width:1440px;
height:768px;
text-align:center;
background:blue;/*现在是盒子3套了盒子2,所以显示肯定是错误的*/
position:relative;
}
.index_b2{
width:884px;
height:347px;
text-align:center;
background:yellow;
position:absolute;
top:200px;
left:278px;
}</style>
</head>
<body>
<div class="index_b1">
<div class="index_b2">
</div>
<div class="index_b3">
</div>
</div>非得使用嵌套的HTML格式吗?
这样把2和3使用兄弟元素,使用定位可以实现你的要求的,我这里把背景改成了颜色。而你说的那个按钮效果,可以使用定位热点实现吧。也是基于定位的。
这些区域 是想基于某个div来定位 目前设想的是放在最小的DIV里来判断 不过你这样说的话 以大的来定位也可以,但是比较担心会因为分辨率低的浏览器引起错位
其实用PS做好小图盖大图的图片是最方便的,但是实在不好意思麻烦美工妹子...
感谢,一语惊醒梦中人,相对定位+Z轴分层 这个之前怎么就没想到呢... 能否实现按需要的叠加 待我试试再说