2016-02-05 55 views
0

我有一些代码在我的vBulletin系统上运行,它根据两个配置文件字段设置了渐变的用户名颜色。但是,我想添加闪光点,我该如何解决?CSS - 两个背景?

<span style="-webkit-text-fill-color:transparent; background:-webkit-gradient(linear, left top, right top, color-stop(0, COLOUR1), color-stop(1, COLOUR2)); background-size:0; text-shadow:none; -webkit-background-size:auto; -webkit-background-clip:text; font-weight:bold;">Forum Name</span> 

我该如何将这个闪烁代码添加到等式?

background: url(custom/v2/sparkles/sparkle-rainbow.gif) !important; 

在此先感谢!

+0

你想波光粼粼,以填补该文本是在容器?或者你想让文字本身闪耀?你可以编辑HTML或只是CSS? – SwankyLegg

+0

我希望文字本身闪耀。谢谢@SwankyLegg – Andrew

回答

0

只需添加url(custom/v2/sparkles/sparkle-rainbow.gif)background部分的结尾:

span{ 
    -webkit-text-fill-color: transparent; 
    background: -webkit-linear-gradient(transparent, transparent), url(http://www.myspacehippo.com/files/glitterbacks/bg345.gif) repeat; 
    background-size: 0; 
    text-shadow: none; 
    -webkit-background-size: auto; 
    -webkit-background-clip: text; 
    font-weight:bold; 
} 

在行动

span{ 
 
\t font-size:100px; 
 
\t font-family:impact; 
 
    -webkit-text-fill-color: transparent; 
 
    background: -webkit-linear-gradient(transparent, transparent), url(http://www.myspacehippo.com/files/glitterbacks/bg345.gif) repeat; 
 
    text-shadow: none; 
 
    -webkit-background-size: auto; 
 
    -webkit-background-clip: text; 
 
    font-weight:bold; 
 
}
<span>This Text</span>