HTML and CSS Learning notes

Source: Internet
Author: User
1. Block-level elements distinguish block-level elements from row elements:
  • Block-level elements always appear on one line, rejecting other elements from the same line;
  • The line height of block-level elements and the internal and external margins can be directly controlled;
  • It can accommodate inline elements and other elements;
Line element:
  • can be in line with other elements;
  • Height and margin cannot be set directly (can be set by Display:inline-block/block);
  • Width is its text and the width of the picture can not be changed (left and right margin/padding valid, upper and lower invalid;);
  • Inline elements can only hold text and other inline elements
The fundamental difference between 2.relative and absolute: The former is out of the document flow, while the latter is not. 3. Learn some New tricks

A. The Layout-flow attribute has two values: horizontal (font level setting), Vertical-ideographic (vertical lines display);

B. Box-sizing:border-box;content-box; The emphasis is on how the actual size of the box is calculated. The former padding and margin are included, while the latter's actual width is =padding+margin+border+content;

C. Small icons and text alignment (set negative values)

img{vertical-align:-10px;}

HTML and CSS Learning notes

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.