HTML + CSS Study Notes (3)

Source: Internet
Author: User

1.

The width of the entire box model in the page is left border+Left Border+Left Filling+Content+Right Filling+Right Border+Right border, andCSSStyleWidthThe defined width is only the width of the content part.

2. CSSPriority

IDPriority higherClass(IDDo not repeat; otherwiseJSIt will causeJSSyntax error. Only the first one can be obtained.IDObject ).

The following style overwrites the previous

The specified value is higher than the inherited value.

The intra-row style is higher than the internal or external style.

3.

At this time, we need to write differentCSSSo that it can be compatible with different browsers at the same time and get the desired page effect in different browsers.

This is different for different browsersCSS codeThe process is calledCSS hack,Also called writeCSS hack.


4.InIE6And later versions and standard browsers, whenMargin: auto;You can center the box model.

5. Line-heightThe default value is1.0-1.2

6. Text-align: justifyIt indicates that the left and right sides are aligned with the border. It is applicable to text with multiple lines, and a single line does not work.

7. Word-spacing: It has no effect on Chinese.WordIt is a string composed of non-null characters and surrounded by spaces. You can add a space between Chinese characters to make it take effect. However, you can also setLetter-spacingAttribute,CSSUse Chinese as letters.

8. when both white-space: nowrap (display in a row) Text-overflow: ellipsis; overflow: when hiding these three styles, you can use ...... display

9.The input in form can be set to readonly and disable. The difference between the two attributes is as follows: readonly cannot be edited, but disable can be selected and copied.

And will not be submitted to the server.

 

 

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.