优艾设计网

父元素overflow-y: scroll; 里面的子元素绝对定位被隐藏。 财富值45?

父级元素overflow-y: scroll; 里面的子元素绝对定位被隐藏。

<style> *{ margin: 0; padding: 0; } .side{ float: right; width: 300px; height: 100%; overflow-y: auto; } .item{ position: relative; margin: 10px 0; } .item-hd{ background-color: #ccc; font-size: 14px; line-height: 30px; text-align: center; } .item-bd{优艾设计网_Photoshop百科 display: none; position: absolute; top:0; right: 280px; width: 300px; height: 200px; background-color: #f00; z-index: 9; } .item:hover .item-bd{ display: block; } </style> <div class="side"> <div style="height:300px;"></div> <div class="box"> <div class="hd">XXXX</div> <div class="bd"> <div class="item"> <div class="item-hd">2333</div> <div class="item-bd"> 666 </div> </div> <div class="item"> <div class="item-hd">2333</div> <div class="item-bd"> 666 </div> </div> <div class="item"> <div class="item-hd">2333</div> <div class="item-bd"> 666 </div> </div> <div class="item"> <div class="item-hd">2333</div> <div class="item-bd"> 666 </div> </div> <div class="item"> <div class="item-hd">2333</div> <div class="item-bd"> 666 </div> </div> <div class="item"> <div class="item-hd">2333</div> <div class="item-bd"> 666 </div> </div> </div> </div><div style="height:800px;"></div> </div>

在线代码地址:http://runjs.cn/code/x3l82ejf


0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜