13 The Display Property,display property

Source: Internet
Author: User
Tags expression header visibility

The trick to manipulating HTML elements is to understand that the way they work is not in a specific form. Some of the pages made up of labels can be set to any style. Most HTML elements in the browser default style are made up of font styles, margin,padding, and are essentially display types.

displayAttributes are basically divided into inline , block , and none .

inlineAs it was meant to be--the element shown as inline is a row. strong, anchor anchors and em accent elements are rows by default.

blockWrap the element around. The caption and paragraph elements are block elements.

none, meaning does not show elements, in usability can achieve beautiful effect, alternating style or hover effect of advanced application.

Set performance can be better used in Web page production.

h1 {display: inline;font-size: 2em;}#header p {display: inline;font-size: 0.9em;padding-left: 2em;}

The set caption H1 is a row element and can be on the same line as the following element.

#navigation, #seeAlso, #comments, #standards {display: none;}

The code above can be used in print styles, such as navigation, which does not display navigation when printed.

display:nonevisibility:hidden;the difference is that the display of the display:none element is completely canceled, the visibility:hidden element position remains but the visual content is not visible. For example, if the second paragraph in 3 is set to display:none , the first paragraph will be followed by only the third paragraph, and if set to visibility:hidden , the paragraphs will be empty.

Form

Understand table-related performance attribute values best method imagine HTML table. tableis the initial performance that you can use to simulate the table-row table-cell TD.

displayAttributes are further accessible by using table-column ,,, table-row-group table-column-group table-header-group , table-footer-group and table-caption . You can now build a table directly using columns, faster than using row constructs in HTML.

Finally, inline-table set the table before and after the line.

Using CSS tables can severely impair usability. HTML should be used to convey semantics, so if you have tabular data, you can use HTML tables. Using CSS tables can only produce bad data if no CSS data will be unreadable.

Other forms of expression

list-itemList items, just like the elements in the HTML that you expect li . They need to be nested in

      and
        elements inside the display.

        run-inThe representation of an element is determined by its parent element. Neither IE nor Mozilla supports it.

        compatAccording to the upper and lower Arvin decided the form of expression, the same IE and Mozilla do not support.

        makerUse only in :before and :after pseudo elements to set content the performance of attributes. contentproperty is the default behavior maker , so it is only useful when overwriting the original property.

        contentproperty, which is the default maker , so it is only used when overwriting the original property.







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.