鼠标移到文字里,弹出一个灰色的框
这个功能要怎么实现
<style type="text/css">.div1 { position: relative; width: 130px; height: 100px; background-color: #eee;}.div1 div { position: absolute; width: 100%; height: 30px; bottom: 0; background-color: rgba(0,0,0,0.6); color: #fff; display: none;}.div1:hover div { display: block;}</style></head><body><div class="div1">aaaaaaaaaaaaaaa <br />aaaaaaaaaaaaaaa <br />aaaaaaaaaaaaaaa <br />aaaaaaaaaaaaaaa <br />aaaaaaaaaaaaaaa <br /> <div>xxxxxxxxxxxx</div></div>
<style type="text/css">.div1 { position: relative; width: 130px; height: 100px; background-color: #eee;}.div1 div { position: absolute; width: 100%; height: 30px; bottom: 0; background-color: rgba(0,0,0,0.6); color: #fff; display: none;}.div1:hover div { display: block;}</style></head><body><div class="div1">aaaaaaaaaaaaaaa <br />aaaaaaaaaaaaaaa <br />aaaaaaaaaaaaaaa <br />aaaaaaaaaaaaaaa <br />aaaaaaaaaaaaaaa <br /> <div>xxxxxxxxxxxx</div></div>
HTML怎么学习?HTML怎么入门?HTML在哪学?HTML怎么学才快?不用担心,这里为大家提供了HTML速学教程(入门课程),有需要的小伙伴保存下载就能学习啦!
Copyright 2014-2025 https://www.php.cn/ All Rights Reserved | php.cn | 湘ICP备2023035733号