CSS3样式文本转换为多个单词

时间:2017-04-18 10:00:38

标签: css3 css-transforms

<li><a>BACKGROUND SCORE</a></li>

i would like to transform this word into

<li><a>Background Score</a></li>

i have tried this

li>a { text-transform: lowercase }
li>a:first-letter { text-transform: capitalize}

bt输出只改变第一个字母的第一个字

<li><a>Background score</a></li>

1 个答案:

答案 0 :(得分:0)

尝试这样做:

<html> 
    <head>
        <style>
        li>a { text-transform: lowercase;
        display: inline-block;}
li>a:first-letter { text-transform: capitalize;}
        </style>
    </head>
    <body>
            <li><a>BACKGROUND SCORE</a></li>            
    </body>

</html>

你会得到你想要的东西。