Web Development font Settings

Source: Internet
Author: User

EM: The font-size of the parent element is the relative unit;

The font-size of rem:html is relative unit;

In order to solve the problem of REM in the unit conversion, we introduce a small method using REM, set the HTML font size to font-size:62.5%, and then use REM when it is better, such as 1.2REM=12PX,1.4REM=14PX, 1.6rem=16px.

Single-line text overflow hiding:
1, the definition of the text of the parent element of the width of the box, width;
2, beyond the hidden Overflow:hidden;
3. Force text to display white-space:nowrap on one line;
4, overflow text display ellipsis text-overflow:ellipsis

Multiple lines of text overflow:

Multi-line text display ellipsis

1. Width of parent element

2, beyond the text hidden Overflow:hidden

3, text overflow display ellipsis text-overflow:ellipsis

4, Word-break:break-all

5, Display:box

6, Box-orient:vertical

7, Line-clamp:number;

Web Development font Settings

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.