内射老阿姨1区2区3区4区_久久精品人人做人人爽电影蜜月_久久国产精品亚洲77777_99精品又大又爽又粗少妇毛片

css設(shè)置背景圖片模糊,內(nèi)容不模糊

需求:一個p設(shè)置了background: url,現(xiàn)在需要使圖片背景模糊,p內(nèi)的文字清晰顯示。

目前創(chuàng)新互聯(lián)公司已為近1000家的企業(yè)提供了網(wǎng)站建設(shè)、域名、虛擬空間、網(wǎng)站托管維護、企業(yè)網(wǎng)站設(shè)計、渝北網(wǎng)站維護等服務(wù),公司將堅持客戶導(dǎo)向、應(yīng)用為本的策略,正道將秉承"和諧、參與、激情"的文化,與客戶和合作伙伴齊心協(xié)力一起成長,共同發(fā)展。

原始代碼:

<!DOCTYPE html><html lang="en"><head>
    <meta charset="utf-8">
    <style type="text/css">
        .content {            color: #ffffff;            font-size: 40px;        }
        .bg {            background: url('1.jpg');            background-repeat: no-repeat;            background-position: center;            background-size: cover;            height:600px;            text-align: center;            line-height: 600px;        }
    </style></head><body><p class="bg">
    <p class="content">我是內(nèi)容</p></p></body></html>

原始效果:

解決方法:內(nèi)容和圖片分別置于一個p,通過css設(shè)置背景p模糊度,設(shè)置內(nèi)容p絕對位置。

html代碼:

<!DOCTYPE html><html lang="en"><head>
    <meta charset="utf-8">
    <style type="text/css">
        .content {            color: #ffffff;            font-size: 40px;        }
        .bg {            background: url('1.jpg');            height:600px;            text-align: center;            line-height: 600px;        }
        .bg-blur {            float: left;            width: 100%;            background-repeat: no-repeat;            background-position: center;            background-size: cover;            -webkit-filter: blur(15px);            -moz-filter: blur(15px);            -o-filter: blur(15px);            -ms-filter: blur(15px);            filter: blur(15px);        }
        .content-front {          position:absolute;          left: 10px;          right: 10px;          height:600px;          line-height: 600px;          text-align: center;        }

    </style></head><body>
    <p>
        <p class="bg bg-blur"></p>
        <p class="content content-front">我是內(nèi)容</p>
    </p></p></body></html>

效果:

需求:一個p設(shè)置了background: url,現(xiàn)在需要使圖片背景模糊,p內(nèi)的文字清晰顯示。

原始代碼:

<!DOCTYPE html><html lang="en"><head>
    <meta charset="utf-8">
    <style type="text/css">
        .content {            color: #ffffff;            font-size: 40px;        }
        .bg {            background: url('1.jpg');            background-repeat: no-repeat;            background-position: center;            background-size: cover;            height:600px;            text-align: center;            line-height: 600px;        }
    </style></head><body><p class="bg">
    <p class="content">我是內(nèi)容</p></p></body></html>

原始效果:

解決方法:內(nèi)容和圖片分別置于一個p,通過css設(shè)置背景p模糊度,設(shè)置內(nèi)容p絕對位置。

html代碼:

<!DOCTYPE html><html lang="en"><head>
    <meta charset="utf-8">
    <style type="text/css">
        .content {            color: #ffffff;            font-size: 40px;        }
        .bg {            background: url('1.jpg');            height:600px;            text-align: center;            line-height: 600px;        }
        .bg-blur {            float: left;            width: 100%;            background-repeat: no-repeat;            background-position: center;            background-size: cover;            -webkit-filter: blur(15px);            -moz-filter: blur(15px);            -o-filter: blur(15px);            -ms-filter: blur(15px);            filter: blur(15px);        }
        .content-front {          position:absolute;          left: 10px;          right: 10px;          height:600px;          line-height: 600px;          text-align: center;        }

    </style></head><body>
    <p>
        <p class="bg bg-blur"></p>
        <p class="content content-front">我是內(nèi)容</p>
    </p></p></body></html>

效果:

感謝大家的閱讀,希望大家受益良多。

本文轉(zhuǎn)自:https://blog.csdn.net/oHeHeHou/article/details/51975539

推薦教程:《css教程》

文章標(biāo)題:css設(shè)置背景圖片模糊,內(nèi)容不模糊
網(wǎng)站鏈接:http://m.rwnh.cn/article10/cgdpdo.html

成都網(wǎng)站建設(shè)公司_創(chuàng)新互聯(lián),為您提供全網(wǎng)營銷推廣、企業(yè)建站、響應(yīng)式網(wǎng)站、品牌網(wǎng)站制作網(wǎng)站制作、軟件開發(fā)

廣告

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

網(wǎng)站優(yōu)化排名
古田县| 宝应县| 鹤岗市| 常德市| 星子县| 泽库县| 香格里拉县| 郁南县| 定陶县| 高邮市| 松阳县| 伊通| 东安县| 靖宇县| 南昌市| 竹溪县| 黄浦区| 且末县| 裕民县| 枝江市| 安化县| 南陵县| 秦安县| 报价| 赣州市| 凌海市| 西宁市| 饶阳县| 伊春市| 普格县| 大同市| 扎赉特旗| 翼城县| 九龙坡区| 全椒县| 萝北县| 河西区| 兴安县| 美姑县| 鸡西市| 中西区|