主頁 > 知識庫 > 頂部固定div可設(shè)置半透明效果

頂部固定div可設(shè)置半透明效果

熱門標(biāo)簽:阿里云 智能手機(jī) 百度競價點擊價格的計算公式 美圖手機(jī) 使用U盤裝系統(tǒng) 硅谷的囚徒呼叫中心 網(wǎng)站建設(shè) 檢查注冊表項

復(fù)制代碼
代碼如下:

<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>頂部固定</title>
<style type="text/css">
html,body {overflow:hidden;margin:0px;width:100%;height:100%;}
.virtual_body {width:100%;height:100%;overflow-y:scroll;overflow-x:auto;}
.fixed_div {position:absolute;z-index:2008;top:0px;left:0px;right:16px;height:40px;background:#CCCCCC;border-bottom:3px inset;border-color:#006699;
//bottom:20px;
//border:1px solid red;
//border-style:inset;
//半透明效果制作
//filter:alpha(opacity=50);
//-moz-opacity:0.5;
//opacity:0.5;
//background:#666666;
}
</style>
</head>
<body>
<div class="fixed_div"><font color="red">鄭州大學(xué)</font></div>
<div class="virtual_body">
<div style="height:888px;">
<p>


再見,我一定會回來看你的!
</div>
</div>
</body>
</html>

效果圖如下:

標(biāo)簽:煙臺 湘潭 黃山 通遼 山南 賀州 懷化 湖北

巨人網(wǎng)絡(luò)通訊聲明:本文標(biāo)題《頂部固定div可設(shè)置半透明效果》,本文關(guān)鍵詞  ;如發(fā)現(xiàn)本文內(nèi)容存在版權(quán)問題,煩請?zhí)峁┫嚓P(guān)信息告之我們,我們將及時溝通與處理。本站內(nèi)容系統(tǒng)采集于網(wǎng)絡(luò),涉及言論、版權(quán)與本站無關(guān)。
  • 相關(guān)文章
  • 收縮
    • 微信客服
    • 微信二維碼
    • 電話咨詢

    • 400-1100-266