【html】【16】高级篇--毛玻璃效果[模糊]
2015-12-12 16:22
633 查看
参考:
http://www.zhangxinxu.com/wordpress/2013/11/%E5%B0%8Ftip-%E4%BD%BF%E7%94%A8css%E5%B0%86%E5%9B%BE%E7%89%87%E8%BD%AC%E6%8D%A2%E6%88%90%E6%A8%A1%E7%B3%8A%E6%AF%9B%E7%8E%BB%E7%92%83%E6%95%88%E6%9E%9C/
下载:
http://download.csdn.net/detail/a393464140/7105685
效果:
css
html
ok
http://www.zhangxinxu.com/wordpress/2013/11/%E5%B0%8Ftip-%E4%BD%BF%E7%94%A8css%E5%B0%86%E5%9B%BE%E7%89%87%E8%BD%AC%E6%8D%A2%E6%88%90%E6%A8%A1%E7%B3%8A%E6%AF%9B%E7%8E%BB%E7%92%83%E6%95%88%E6%9E%9C/
下载:
http://download.csdn.net/detail/a393464140/7105685
效果:
css
.bg{ background-image: url("cat.jpg"); /* 背景图 */ background-position: center bottom; /* 背景样式 */ background-attachment: fixed; background-size: cover; height: 100%; font-size: 100%; } .glass{ position: relative; /* 玻璃样式 */ padding: 0; border-bottom: 1px solid; border-bottom-color: #ccc; border-bottom-color: rgba(255, 255, 255, 0.2); background-color: rgba(255, 255, 255, 0.2); box-shadow: 0 2px 5px rgba(0, 0, 0, 0.3); margin-left:100px; /* 玻璃图层 偏移&大小 */ margin-top:50px; height: 500px; width: 800px; } .blur { background-image: url("cat.jpg"); /* 背景图 */ height:500px; /* 模糊图层大小 */ width: 800px; position: relative; /* 模糊图层样式 */ padding: 0; background-position: center bottom; background-attachment: fixed; background-size: cover; font-size: 100%; /* 模糊滤镜 */ filter: url(blur.svg#blur); /* FireFox, Chrome, Opera */ -webkit-filter: blur(10px); /* Chrome, Opera */ -moz-filter: blur(10px); -ms-filter: blur(10px); filter: blur(10px); filter: progid:DXImageTransform.Microsoft.Blur(PixelRadius=10, MakeShadow=false); /* IE6~IE9 */ }
html
<head> <meta content="text/html; charset=utf-8" http-equiv="Content-Type" /> <title>Glass Cat</title> <link rel="stylesheet" type="text/css" href="glass-cat.css" > </head> <body class="bg"> <div id="glass" class="glass"> <div id="blur" class="blur"></div> </div> </body> </html>
ok
相关文章推荐
- 【html】【15】特效篇--分页
- pdf2html 手动编译,解决segmentation fault错误
- C#,xml、html节点数据解析
- 客户端提交内容的HTML内容过滤根据
- 使用HtmlHelper类生成有数据绑定的HTML标签
- 【html】【14】特效篇--侧边栏客服
- word文档转html利器
- HTML parser选型测试
- HTML语法大全 html入门基础标签
- html 中文档树
- html标签
- html的各种 1
- 解决DEDECMS Call to undefined function dede_htmlspecialchars()错误
- 测试开发技术:DOM中 innerHTML、innerText、outerHTML、outerText的区别
- html 弹性盒子
- 关于html中的<div>框
- HTML中背景图片的相关内容
- html表单的默认enctype
- html添加下划线,下划线颜色,字体颜色,下移,且鼠标为手型
- 如何设置HTML页面自适应宽度的table(表格)(一)