我在錨標記上使用了-webkit-background-clip: text,border
和color: transparent
,看起來下劃線從未變得可見。如何在背景剪輯中包含文字修飾:文字;影響?
我想要的是在背景剪輯中包含文字修飾。
這裏是我的CSS:
.background-clip {
background: url(images/index-background.jpg) repeat top center fixed;
-webkit-background-clip: text,border;
color: transparent;
}
.background-clip a {
color: transparent;
}
.background-clip a:hover {
text-decoration: underline;
-webkit-text-decorations-in-effect: underline; /* doesn't seem to do anything, I am having trouble finding definitive documentation on this */
}
和相關的HTML:
<div class="background-clip"><a href="#">Imagine a lot of text here</a></div>
我有很多的麻煩找WebKit的CSS屬性的完整的文檔。有誰知道我能做些什麼來讓文字下劃線出現在我的錨標籤上?
我想要的是剪輯下劃線和文本的背景。 -webkit-background-clip:當文本顏色也設置爲透明時,文本幾乎在文本上形成一個圖像,這是一個非常酷的效果。 – 2012-02-03 22:47:01