【问题标题】:I need to capitalize the next string css我需要将下一个字符串 css 大写
【发布时间】:2020-06-02 01:06:58
【问题描述】:

我需要将下一个字符串 css 大写

1-项目

.table-generic p::first-letter {
text-transform: uppercase;}

如何在开头使用那个号码?

【问题讨论】:

    标签: css reactjs string styles uppercase


    【解决方案1】:

    对于这种特定情况,您可以在元素本身上使用 text-transform: capitalize(而不是 first-letter 伪元素)。

    p {
      text-transform: capitalize;
    }
    <p>1- item</p>

    也许您还有其他要求或限制,但从您的问题中看不出来。

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2013-02-03
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      相关资源
      最近更新 更多