css模糊效果代码实例
分类:实例代码
分享一段代码实例,它实现了模糊效果。
代码实例如下:
<!doctype html> <html> <head> <meta charset="utf-8"> <meta name="author" content="http://www.pipipi.net/" /> <title>前端教程网</title> <style> * { padding: 0; margin: 0; } .title { width: 100%; position: fixed; top: 0; height: 100px; } .title-mask { background: rgba(255,255,255,.7); border-bottom: solid 1px #fff; position: absolute; width: 100%; height: 100%; z-index: 10; } .title-ul li { line-height: 100px; float: left; margin-right: 10px; } p { font-size: 24px; } .title-bg { position: absolute; width: 100%; height: 100%; overflow: hidden; -webkit-filter: blur(3px); text-shadow: 0 0 10px #000; color: transparent; } </style> </head> <body> <div class="title"> <div class="title-mask"></div> <div class="title-bg"></div> </div> <div class="cont"> <p>只有努力奋斗才会有美好未来</p> <p>本站的url地址是www.pipipi.net</p> <p>本站专注于前端知识的分享</p> </div> </body> </html>
上面的代码实现了我们的要求,更多内容可以参阅相关阅读。
相关阅读:
(1).rgba参阅CSS3 RGBA颜色一章节。
(2).filter参阅css3 filter属性一章节。
(3).text-shadow参阅CSS3 text-shadow一章节。
网站出售中,有意者加微信:javadudu