本文介绍了称呼在词的个别信件的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧! 问题描述 我目前正在尝试风格的单词siteripe。我想让每个字母有不同的颜色。如此网页上所示,我可以只用第一个字母样式代替下面的CSS代码 #namer:first-letter { color:#09C; font-size:1.1em; font-weight:bold; } 由于字中有八个字母,剩下七个?我尝试了造型波纹管,但它没有工作。是否有一种方法来单独设计字母样式,而不使用跨度来包装每个字母。 #namer:(1)-letter { color:#09C; font-size:1.1em; font-weight:bold; } 解决方案请记住,CSS 级联。 # namer:第一个字母{颜色:#09C; font-size:1.1em; font-weight:bold; } #namer { color:red; } 更新: b Lettering.js 允许为个别字母设置样式。有关其他信息,请参阅下面的注释。上面的信息仅用于设置初始字符的样式,并且在编辑之前对OP的原始问题进行了回答,以使其更清晰。 I' currently trying to Style the word "Siteripe". I'd like each letter to have a different color. As shown on this page I'm able to style just the first letter with the lines of CSS code below#namer:first-letter { color:#09C; font-size:1.1em; font-weight:bold;}Since there eight(8) letters in the word, how do I style the remaining seven? I did try the styling bellow but it didn't work. Is there a way to Style the letters individually without wrapping each letter using spans. #namer:(1)-letter { color:#09C; font-size:1.1em; font-weight:bold; } 解决方案 Remember, CSS is Cascading. You can style the whole #namer element separately from the first letter - the more specific style will override the more general one.#namer:first-letter { color:#09C; font-size:1.1em; font-weight:bold;}#namer { color:red;}Update:Lettering.js allows for styling individual letters. See the comments below for additional information. The info above is for styling the initial character only, and was in answer to the OP's original question before it was edited to make it clearer. 这篇关于称呼在词的个别信件的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!
10-29 15:34