国产探花免费观看_亚洲丰满少妇自慰呻吟_97日韩有码在线_资源在线日韩欧美_一区二区精品毛片,辰东完美世界有声小说,欢乐颂第一季,yy玄幻小说排行榜完本

首頁 > 開發(fā) > CSS > 正文

css背景色透明 內(nèi)容不透明的解決方法(兼容所有瀏覽器)

2024-07-11 08:27:57
字體:
供稿:網(wǎng)友

復(fù)制代碼
代碼如下:
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
"<a >
<html xmlns="<a >
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8"/>
<title>Css:背景色透明,內(nèi)容不透明之終極方法!兼容所有瀏覽器</title>
<style type="text/css">
*{margin:0;padding:0;}
body{background:#3f3f3f;font-family:"宋體", Arial;}
h1, h2, h3, h4, h5, h6{font-weight:normal;font-size:100%;}
img{border:none 0;}
#bos{width:820px;background:#fff;margin:0 auto;}
#bos ul{zoom:1;overflow:hidden;background:#fff;padding:5px 0 5px 5px;}
#bos ul li{width:260px;position:relative;overflow:hidden;float:left;margin:5px;background:#fff;}
.img_wrap{width:258px;border:1px solid #ccc;border-radius:15px;display:block;overflow:hidden;}
#bos ul li h2{width:100%;height:0px;line-height:50px;color:#fff;text-indent:1em;font-size:14px;font-family:微軟雅黑;position:absolute;bottom:0px;border-bottom-left-radius:15px;border-bottom-right-radius:15px;filter:progid:DXImageTransform.Microsoft.gradient(enabled='true',startColorstr='#44000000',endColorstr='#44000000');background:rgba(0,0,0,.6);}
</style>
</head>
<body>
<div id="bos">
<ul>
<li>
<a class="img_wrap" href="#"><img _fcksavedurl=""#"><img" src="<a alt="" /></a>
<h2>網(wǎng)站防詐騙重要提示 購物滿59元免運(yùn)費(fèi)</h2>
</li>
<li>
<a class="img_wrap" href="#"><img _fcksavedurl=""#"><img" src="<a alt="" /></a>
<h2>Android客戶端升級新體驗(yàn) 配送延誤通知</h2>
</li>
<li>
<a class="img_wrap" href="#"><img _fcksavedurl=""#"><img" src="<a alt="" /></a>
<h2>陳年談品牌的本分 工行e支付可直減60元</h2>
</li>
<li>
<a class="img_wrap" href="#"><img _fcksavedurl=""#"><img" src="<a alt="" /></a>
<h2>陳年談品牌的本分 工行e支付可直減60元</h2>
</li>
<li>
<a class="img_wrap" href="#"><img _fcksavedurl=""#"><img" src="<a alt="" /></a>
<h2>陳年談品牌的本分 工行e支付可直減60元</h2>
</li>
<li>
<a class="img_wrap" href="#"><img _fcksavedurl=""#"><img" src="<a alt="" /></a>
<h2>陳年談品牌的本分 工行e支付可直減60元</h2>
</li>
</ul>
</div>
<script type="text/javascript">
var bos = document.getElementById('bos');
var lis = bos.getElementsByTagName('li');
var len = lis.length;
while (len--) {
lis[len].onmouseover = function () {
over(this.getElementsByTagName('h2')[0]);
}
lis[len].onmouseout = function () {
out(this.getElementsByTagName('h2')[0]);
}
}
function over(obj) {
var ypos = 0;
if (obj.time) {
clearInterval(obj.time)
}
obj.time = setInterval(function () {
if (ypos < 50) {
ypos += Math.ceil((50 - ypos) / 3);
}
obj.style.height = ypos + "px";
}, 25);
}
function out(obj) {
var ypos = 50;
if (obj.time) {
clearInterval(obj.time)
}
obj.time = setInterval(function () {
if (ypos >= 0) {
ypos -= Math.ceil((ypos - 0) / 3);
}
obj.style.height = ypos + "px";
}, 25);
}
</script></body>
</html>
發(fā)表評論 共有條評論
用戶名: 密碼:
驗(yàn)證碼: 匿名發(fā)表
主站蜘蛛池模板: 阜康市| 东乡县| 基隆市| 正宁县| 华亭县| 侯马市| 日土县| 垫江县| 株洲市| 冀州市| 丹东市| 西安市| 疏附县| 巴林右旗| 安龙县| 连山| 双桥区| 屯昌县| 高密市| 巴彦淖尔市| 井陉县| 鸡泽县| 巫溪县| 定襄县| 曲水县| 宝应县| 台江县| 同德县| 老河口市| 泽普县| 彭水| 高邑县| 无极县| 乳源| 高清| 武清区| 太康县| 徐汇区| 天祝| 玛多县| 邵武市|