css文本样式及控制文本的大小写

常用文本样式如下:

<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>text文本样式</title>
    <style>
        h3{
            /*text-indent:首行缩进*/
            text-indent: -2em;
            padding-left:2em;
            /*text-shadow:必需。水平阴影的位置。允许负值。
                          必需。垂直阴影的位置。允许负值。
                          可选。模糊距离
                          可选。阴影颜色*/
            text-shadow: 5px 5px 1px red;
        }
        p{
            padding-left: 2em;
            /*text-wrap规定文本换行标准,配合width使用*/
            width:200px;
            text-wrap: normal;
        }
        #p1{
            /*text-transform属性控制文本的大小写*/
            /*capitalize首写字母大写*/
            text-transform: capitalize;
        }
        #p2{
            /*lowercase全部小写*/
            text-transform: lowercase;
        }
        #p3{
            /*uppercase全部大写*/
            text-transform: uppercase;
        }
    </style>
</head>
<body>
<h3>title</h3>
<p id="p1">this is a test text,this is a test text,this is a test text</p>
<p id="p2">this is a test text,this is a test text,this is a test text</p>
<p id="p3">this is a test text,this is a test text,this is a test text</p>
</body>
</html>

 

转载于:https://my.oschina.net/u/3628277/blog/1490201

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值