The "first-letter" pseudo-element is used to add a special style to the first letter of a text:
Code
<html>
<head>
<style type="text/css">
p:first-letter
{
color:#ff0000;
font-size:xx-large;
}
</style>
</head>
<body>
<p>www.simplyasp.blogspot.com/2010/06/show-image-from-database-and-mouse-over.html</p>
</body>
</html>
Output
Note: The "first-letter" pseudo-element can only be used with block-level elements.
Note: The following properties apply to the "first-letter" pseudo- element:
- font properties
- color properties
- background properties
- margin properties
- padding properties
- border properties
- text-decoration
- vertical-align (only if "float" is "none")
- text-transform
- line-height
- float
- clear
No comments:
Post a Comment