CSS drop-caps: First-letter usage

Source: Internet
Author: User

See some of the beginning of a paragraph of the text of the site is very large, looks very special, this is called the first word sinking effect, CSS has ready-made grammar can be used, that is: First-letter, we first to understand: First-letter syntax Description: selector: first-letter {CSS Rule}, this pseudo object is intended only for block objects. Inline elements to use this property, you must first set the height or width property of the object, or set the Position property to absolute, or the display property to block. You can use the Font-size property and the float property together in this pseudo object to make a drop cap effect. A simple example helps to understand usage:

The example defines the

The first letter of the text in the "source" word is larger than other characters, here to first define the general text size in Div, to make a distinction, in general, the general text of the font size than the sinking of the initial letter size, where the general font size is defined in the body selector, the font size of 12px.

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.