日韩性视频-久久久蜜桃-www中文字幕-在线中文字幕av-亚洲欧美一区二区三区四区-撸久久-香蕉视频一区-久久无码精品丰满人妻-国产高潮av-激情福利社-日韩av网址大全-国产精品久久999-日本五十路在线-性欧美在线-久久99精品波多结衣一区-男女午夜免费视频-黑人极品ⅴideos精品欧美棵-人人妻人人澡人人爽精品欧美一区-日韩一区在线看-欧美a级在线免费观看

歡迎訪問 生活随笔!

生活随笔

當前位置: 首頁 > 编程资源 > 编程问答 >内容正文

编程问答

仅模糊背景图像而不是前面的文本

發(fā)布時間:2024/7/5 编程问答 54 豆豆
生活随笔 收集整理的這篇文章主要介紹了 仅模糊背景图像而不是前面的文本 小編覺得挺不錯的,現(xiàn)在分享給大家,幫大家做個參考.

正如標題所說。 如何模糊容器的背景圖像而不模糊前面的文本?

<div class="card"> <div class="head"> <div class="title"> <span>Card Title</span> </div> </div> <div class="body-container"> <div class="body"> <div class="content"> <span>Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum.</span> </div> </div> </div> </div>

.container a .body-container { background-image: url("https://i2.wp.com/digital-photography-school.com/wp-content/uploads/2019/02/Landscapes-01-jeremy-flint.jpg"); filter: blur(1px); }

body, html { height: 100%; margin: 0; font-family: Arial, Helvetica, sans-serif; } * { box-sizing: border-box; } .bg-image { /* The image used */ background-image: url("https://i2.wp.com/digital-photography-school.com/wp-content/uploads/2019/02/Landscapes-01-jeremy-flint.jpg"); /* Add the blur effect */ filter: blur(8px); -webkit-filter: blur(8px); /* Full height */ height: 100%; /* Center and scale the image nicely */ background-position: center; background-repeat: no-repeat; background-size: cover; } /* Position text in the middle of the page/image */ .bg-text { background-color: rgb(0, 0, 0); /* Fallback color */ background-color: rgba(0, 0, 0, 0.4); /* Black w/opacity/see-through */ color: white; font-weight: bold; border: 3px solid #f1f1f1; position: absolute; top: 50%; left: 50%; transform: translate(-50%, -50%); z-index: 2; width: 80%; padding: 20px; text-align: center; } <div class="bg-image"></div> <div class="bg-text"> <h2>Blurred Background</h2> <h1 style="font-size:50px">I am John Doe</h1> <p>And I'm a Photographer</p> </div>

轉(zhuǎn)載于:https://www.cnblogs.com/gamecenter/p/11096028.html

總結(jié)

以上是生活随笔為你收集整理的仅模糊背景图像而不是前面的文本的全部內(nèi)容,希望文章能夠幫你解決所遇到的問題。

如果覺得生活随笔網(wǎng)站內(nèi)容還不錯,歡迎將生活随笔推薦給好友。