这次给大家带来怎样使用伪元素first-letter让文字首字母大写,使用伪元素first-letter让文字首字母大写的注意事项有哪些,下面就是实战案例,一起来看一下。
<!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>
相信看了本文案例你已经掌握了方法,更多精彩请关注其它相关文章!
相关阅读:
bootstrap-validator使用详解
iframe的跨域使用方法
js声明函数的四种方式
以上就是怎样使用伪元素first-letter让文字首字母大写的详细内容。