首頁 >web前端 >html教學 >html?浮框_html/css_WEB-ITnose

html?浮框_html/css_WEB-ITnose

WBOY
WBOY原創
2016-06-21 09:03:201020瀏覽


鼠标移到文字里,弹出一个灰色的框
这个功能要怎么实现


回复讨论(解决方案)

<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>


陳述:
本文內容由網友自願投稿,版權歸原作者所有。本站不承擔相應的法律責任。如發現涉嫌抄襲或侵權的內容,請聯絡admin@php.cn