Home >Web Front-end >JS Tutorial >How to use the pseudo element first-letter to capitalize the first letter of text

How to use the pseudo element first-letter to capitalize the first letter of text

php中世界最好的语言
php中世界最好的语言Original
2018-03-09 13:47:022617browse

This time I will show you how to use the pseudo-element first-letter to capitalize the first letter of text, and how to use the pseudo-element first-letter to capitalize the first letter of text. Let’s take a look.

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN"><HTML>
 <HEAD>
  <TITLE>Drop cap initial letter</TITLE>
  <STYLE type="text/css">
   P { 
     font-size: 12pt; 
     line-height: 1.2; 
     width:250px;
   }   P::first-letter { 
     font-size: 224%; 
     margin-top: -5px;     font-weight: bold; 
     float:left; 
   }   SPAN { 
     text-transform: uppercase 
   }  </STYLE>
 </HEAD>
 <BODY>
  <P><SPAN>The first</SPAN> few words of an article
    in The Economist.The first few words of an article
    in The Economist.</P>
 </BODY></HTML>
I believe you have mastered the method after reading the case in this article. For more exciting information, please pay attention to other related articles on the php Chinese website!

Related reading:

Detailed explanation of using bootstrap-validator


Cross-domain usage of iframe


Four ways to declare functions in js

The above is the detailed content of How to use the pseudo element first-letter to capitalize the first letter of text. For more information, please follow other related articles on the PHP Chinese website!

Statement:
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