当前位置:Gxlcms > css > CSS中text-transform属性实现字符串转换的代码

CSS中text-transform属性实现字符串转换的代码

时间:2021-07-01 10:21:17 帮助过:76人阅读

本篇文章给大家带来的内容是关于CSS中text-transform属性实现字符串转换的代码,有一定的参考价值,有需要的朋友可以参考一下,希望对你有所帮助。

<!DOCTYPE html><html><head>
    <meta charset="UTF-8">
    <title>字符转换</title>
    <style>
        p.none {            
        text-transform: none;        
        <!-- 正常 -->
        }

        p.uppercase {
            text-transform: uppercase;        
            <!-- 转大写 -->
        }

        p.lowercase {
            text-transform: lowercase;        
            <!-- 转小写 -->
        }

        p.capitalize {
            text-transform: capitalize;        
            <!-- 只对首字母大写 -->
        }    
        </style>
        </head>
        <body>
        <p class="none">This is a some Text.This is a some Text.</p>
        <p class="uppercase">This is a some Text.</p>
        <p class="lowercase">This is a some Text.</p>
        <p class="capitalize">This is a some Text.</p>
        </body>
        </html>

相关文章推荐:

CSS中table表格的两种使用方法(实例)

多列布局的概念是什么?CSS多列布局的应用(实例代码)

以上就是CSS中text-transform属性实现字符串转换的代码的详细内容,更多请关注Gxl网其它相关文章!

人气教程排行