zoukankan      html  css  js  c++  java
  • 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>
  • 相关阅读:
    jQuery文档处理--事件--动画
    jQuery选择器
    jQuery入门
    正则表达式
    Bootstrap 的基本实现
    JavaScript--DOM
    JavaScript--BOM
    JavaScript--ECMAScript
    CSS3动画
    CSS3新增的选择器
  • 原文地址:https://www.cnblogs.com/chooper/p/6488794.html
Copyright © 2011-2022 走看看