2012-08-12 39 views

回答

3

中有一個CSS3屬性background-clip: text,雖然它沒有在每一個瀏覽器。有關更多詳細信息,請參閱here

2

由於CSS-技巧顯示在此article,「後面的文本圖像」可以做到這樣:

h1 { 
    color: white; /* Fallback: assume this color ON TOP of image */ 
    background: url(images/fire.jpg) no-repeat; 
    -webkit-background-clip: text; 
    -webkit-text-fill-color: transparent; 
} 

但它不能保證所有的瀏覽器工作,所以他們提出一些變通,如modernizr

這裏是什麼樣子時,它的工作原理是:

What it looks like when it works

相關問題