网页设计中,怎么用CSS做出磨砂的背景效果?

html-css010

网页设计中,怎么用CSS做出磨砂的背景效果?,第1张

代码:透明背景(带磨砂玻璃效果)  注:在粘贴到空白模板前一定先打个空格。

<STYLE type=text/css>

.bodytop{background:#transparent}

.banner{ background:#transparent}

.menu{ background:#transparent}

.bodyBg {background:#transparentfilter:progid:DXImageTransform.Microsoft.gradient(GradientType ='1',enabled='true',startColorstr=#AAFFFFFF, endColorstr=#AAFFFFFF)}

.zone{ background:#transparent}

.bodyBottom{background:#transparent}

.feeds .up{background:#transparent}

.feeds .down{background:#transparent }

.feeds .function{background:#transparent}

.feeds .page{background:#transparent}

.aList .sysHand .up{background:#transparent}

.aList .sysHand .down{background:#transparent}

.gbook .sysHand .up{background:#transparent}

.gbook .sysHand .down{background:#transparent}

.gbook .title{display:none}

.logo{display:none}

.gbook .page{background:#transparent }

.gbook .login{background:#transparent}

.box_1{background:#transparent}

.box_2{background:#transparent}

.calendar{background:#transparent}

.calendar .mid{background:#transparent}

.calendar .top{background:#transparent}

.calendar .title{background:#transparent}

.calendar .bold td{background:#transparent}

.calendar .bottom{background:#transparent}

.callboard .mid{background:#transparent}

.callboard .mid img{background:#transparent}

.callboard .front{background:#transparent}

.callboard .back{background:#transparent}

.callboard table{background:#transparent}

.callboard .up{background:#transparent}

.callboard .down{background:#transparent }

.sysBr{background:#transparent}

.sysBr210{background:#transparent}

.label{background:#transparent}

.label .mid{background:#transparent}

.label .top{background:#transparent}

.label .bottom{background:#transparent}

.photo{background:#transparent}

.photo .mid{background:#transparent}

.photo .image{background:#transparent}

.photo .top{background:#transparent}

.photo .bottom{background:#transparent}

.links{background:#transparent}

.links .up{background:#transparent}

.links .down{background:#transparent }

.links .mid{background:#transparent}

body{background:url("

http://s11.sinaimg.cn/orignal/439175a380fda7635072a

") repeat fixed!important}

.add{background:#transparent}

.add .ico{background:#transparent}

</STYLE>

背景图片虚化主要依靠的是 filter: blur(15px) 这个css属性 blur值 越大 模糊程度也越大 最终我们希望的效果图是这样的 实现方式: 第一步 一个大的 div 里面包裹两个 小的 div1 和 div2 第二步 div1元素加入背景、宽高、过滤(filter)、浮动 第三步 div2元素 开启定位 absolute(一定要脱离普通文档流) 现在基本的效果就实现了,想让页面更美观 剩下的就要自己动手喽 关键点就是 filter属性 :让图片模糊 脱离普通文档流 :内容放到模糊div1 的上面