Home > Article > Web Front-end > How to use the pseudo element first-letter to capitalize the first letter of text
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-validatorCross-domain usage of iframeFour ways to declare functions in jsThe 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!