欧美一区二区三区老妇人-欧美做爰猛烈大尺度电-99久久夜色精品国产亚洲a-亚洲福利视频一区二区

CSS如何實現(xiàn)層透明

這篇文章給大家分享的是有關CSS如何實現(xiàn)層透明的內容。小編覺得挺實用的,因此分享給大家做個參考,一起跟隨小編過來看看吧。

創(chuàng)新互聯(lián)公司服務項目包括東莞網(wǎng)站建設、東莞網(wǎng)站制作、東莞網(wǎng)頁制作以及東莞網(wǎng)絡營銷策劃等。多年來,我們專注于互聯(lián)網(wǎng)行業(yè),利用自身積累的技術優(yōu)勢、行業(yè)經(jīng)驗、深度合作伙伴關系等,向廣大中小型企業(yè)、政府機構等提供互聯(lián)網(wǎng)行業(yè)的解決方案,東莞網(wǎng)站推廣取得了明顯的社會效益與經(jīng)濟效益。目前,我們服務的客戶以成都為中心已經(jīng)輻射到東莞省份的部分城市,未來相信會繼續(xù)擴大服務區(qū)域并繼續(xù)獲得客戶的支持與信任!

具體分析如下:

這個代碼段是演示用CSS控制一個DIV層的透明效果,大家可以看到平鋪的背景已經(jīng)顯現(xiàn)出來,實際上比較簡單就可以實現(xiàn),就是用CSS控制一個DIV層,定義樣式表時加入filter:alpha(opacity=65);這句代碼,里面的值是用來控制透明度的,你可以試著改變它的值,會有不同的透明效果。

代碼如下:


<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>CSS定義層的透明效果</title>
<style type="text/css">
body { 
font-family: Arial, Helvetica, sans-serif; 
line-height: 1.5;
background: url(http://files.jb51.net/file_images/article/201505/2015513164008952.jpg);
color: #fff;
width: 770px;
margin: 0 auto;
padding: 50px;
}
h2,h3 { 
color: #77AFC7 !important;
margin-bottom: 0;
line-height: 1.2em;
}
p {
margin-top: 0;
}
a {
color: #aaa;
}
a:hover {
color: #FFF !important;
text-decoration: none;
}
code { 
background-color: #100;
padding: 0.2em 0.5em;
display: inline-block;
}
#wrapper { 
overflow: hidden;
}
.overlay {
position: absolute;
top: 0;
bottom: 0;
left: 0;
width: 100%;
background: #000;
opacity: 0.65;
-moz-opacity: 0.65;
filter:alpha(opacity=65);
}
.container {
position: relative;
float: left;
}
.content {
position: relative;
float: left;
}
#column-1 {
width: 500px;
}
#column-2 {
width: 250px;
margin-left: 20px;
float: left;
display: inline;
}
#column-1 .content {
padding: 20px;
width: 460px;
}
#column-2 .content {
padding: 10px;
width: 230px;
}
* html #column-1 .overlay { height: expression(document.getElementById("column-1").offsetHeight); }
* html #column-2 .overlay { height: expression(document.getElementById("column-2").offsetHeight); }
</style>
</head>
<body>
<div id="wrapper">
<div id="column-1" class="container">
<div class="overlay"></div>
<div class="content">
<h3>透明的網(wǎng)頁.</h3>
<p>IE6,FF測試通過</p>
<p>這是一個透明的網(wǎng)頁,還不錯吧?實際上是用CSS控制DIV層的半透明狀態(tài),這樣會使平鋪的背景顯現(xiàn)出來,看上去酷了不少。</p>
<p>By <a href="/">CC-Public Domain</a></p>
</div>
</div>
<div id="column-2" class="container">
<div class="overlay"></div>
<div class="content">
<h3>A sidebar</h3>
<p>這是右側,你可以嘗試修改一下。</p>
</div>
</div>
</div>
</body>
</html>

感謝各位的閱讀!關于“CSS如何實現(xiàn)層透明”這篇文章就分享到這里了,希望以上內容可以對大家有一定的幫助,讓大家可以學到更多知識,如果覺得文章不錯,可以把它分享出去讓更多的人看到吧!

網(wǎng)頁標題:CSS如何實現(xiàn)層透明
瀏覽地址:http://www.chinadenli.net/article18/ihoogp.html

成都網(wǎng)站建設公司_創(chuàng)新互聯(lián),為您提供品牌網(wǎng)站設計App開發(fā)網(wǎng)站設計網(wǎng)站策劃網(wǎng)站建設云服務器

廣告

聲明:本網(wǎng)站發(fā)布的內容(圖片、視頻和文字)以用戶投稿、用戶轉載內容為主,如果涉及侵權請盡快告知,我們將會在第一時間刪除。文章觀點不代表本網(wǎng)站立場,如需處理請聯(lián)系客服。電話:028-86922220;郵箱:631063699@qq.com。內容未經(jīng)允許不得轉載,或轉載時需注明來源: 創(chuàng)新互聯(lián)

微信小程序開發(fā)