2012-10-29 166 views
1

我指的是朋友網站http://www.gamezilla.co.za使用jQuery將圖像不透明度添加到背景圖像

背景圖片是一個jQuery插件(backstretch),但圖片上有一個非常輕的網格蒙版。你如何將這個掩碼添加到使用CSS或jQuery的背景圖像?

背景圖像上沒有它的面具,如下所示(http://www.gamezilla.co.za/wp-content/uploads/2012/09/b_homepage.jpg)

任何想法怎麼運行的?

+0

你的意思是像['這個'](http://trentwalton.com/2011/05/19/mask-image-text/)? –

回答

3

他有一個ID爲#pattern-filter的跨度,其中包含一個在圖像頂部重複自身的2x2像素圖像。

查看224add20.273d39.css文件的第338行。

#pattern-filter { 
position:fixed; 
width:100%; 
height:100%; 
background:url(/wp-content/themes/gonzo/images/pattern-filter.png) scroll transparent 
} 
+0

謝謝你的回答,它的工作原理,我在background-div中添加了一個類似的div。他在哪裏聲明#模式過濾器?它不是加載後的dom元素的一部分 – mauzilla

+0

它位於DIV底部,ID爲'backstretch'。 –