css text style and method of controlling the capitalization of text

高洛峰
Release: 2017-03-04 16:59:26
Original
1727 people have browsed it

Commonly used text styles are as follows:

<!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>
Copy after login


## More articles related to css text styles and methods of controlling the capitalization of text Please pay attention to PHP Chinese website!

Related labels:
css
source:php.cn
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template
About us Disclaimer Sitemap
php.cn:Public welfare online PHP training,Help PHP learners grow quickly!