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

歡迎訪問 生活随笔!

生活随笔

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

编程问答

css实现磨砂效果

發布時間:2024/3/24 编程问答 31 豆豆
生活随笔 收集整理的這篇文章主要介紹了 css实现磨砂效果 小編覺得挺不錯的,現在分享給大家,幫大家做個參考.

1. css的濾鏡實現:通過filter實現。

<!DOCTYPE html> <html lang="en"><head><meta charset="UTF-8"><title>Document</title><style>body {/*此處背景圖自行替換*/background: green no-repeat center center fixed;background-size: cover;min-height: 100vh;box-sizing: border-box;margin: 0;padding-top: calc(50vh - 6em);font: 150%/1.6 Baskerville, Palatino, serif;}/*** 整體居中功能;* 背景透明虛化* 溢出隱藏* 邊緣圓角化* 文字增加淡陰影*/.description{position: relative;margin: 0 auto;padding: 1em;max-width: 23em;background: hsla(0,0%,100%,.25) border-box;overflow: hidden;border-radius: .3em;box-shadow: 0 0 0 1px hsla(0,0%,100%,.3) inset,0 .5em 1em rgba(0, 0, 0, 0.6);text-shadow: 0 1px 1px hsla(0,0%,100%,.3);}/*使用濾鏡模糊邊緣*/.description::before{content: '';position: absolute;top: 0; right: 0; bottom: 0; left: 0;margin: -30px;z-index: -1;-webkit-filter: blur(20px);filter: blur(20px);}</style> </head><body><p class="description">SIF4項目原常務副總指揮/重慶京東方智慧電子系統有限公司</p> </body></html>

2. 通過濾鏡背景圖片實現:在背景色上覆蓋上一層濾鏡半透明的圖片。

1.png圖片

<!DOCTYPE html> <html lang="en"><head><meta charset="UTF-8"><title>Document</title><style>body {/*此處背景圖自行替換*/background: green no-repeat center center fixed;background-size: cover;min-height: 100vh;box-sizing: border-box;margin: 0;padding-top: calc(50vh - 6em);font: 150%/1.6 Baskerville, Palatino, serif;}.description {color: #fff;position: relative;margin: 0 auto;padding: 1em; background-image: url("1.png") no-repeat;background-size:100% 100%; width: 350px;height: 254px;background: linear-gradient(90deg, #0070C6 0%, #83C5FF 100%) border-box;box-shadow: 0 3px 7px 0 rgba(35,101,145,0.75);border-radius: 10px;}.bg{width: 100%;height: 100%;position: absolute;top: 0;right: 0;bottom: 0;left: 0;}</style> </head><body><p class="description"><img src="1.png" class="bg">惺惺惜惺惺尋尋尋尋尋尋尋尋尋尋尋尋尋</p> </body></html>

?

總結

以上是生活随笔為你收集整理的css实现磨砂效果的全部內容,希望文章能夠幫你解決所遇到的問題。

如果覺得生活随笔網站內容還不錯,歡迎將生活随笔推薦給好友。