How can I capitalize the first letter of each word in CSS?

前端 未结 3 1014
死守一世寂寞
死守一世寂寞 2021-01-14 00:01

I am trying to capitalize the first letter of each word. I did search for it but i did not get it, is it possible in CSS?

My Code currently works for the first lette

3条回答
  •  无人共我
    2021-01-14 00:53

    You can try to use this:

    p { text-transform: capitalize; }
    

    From the docs:

    text-transform

    This property controls capitalization effects of an element's text.

    capitalize Puts the first character of each word in uppercase; other characters are unaffected.

提交回复
热议问题