Differences between style. Visibility and style. Display

Source: Internet
Author: User
Style. Visibility and style. display can both hide pages. However, visibility occupies domain space while display does not.

    • Set the element display attribute to block, and wrap the line after the element.
    • Setting the element display attribute to inline eliminates line breaks.
    • Set the display attribute of the element to none to hide the content of the element without occupying the space of the domain.
    • Sets the element visibility attribute to Den den to hide the content of the element, but occupies the space of the domain.
    • Set the element visibility attribute to visible to display the element content.

 

<P> welcome <span style = "display: inline"> You </span> to my blog </P>

Effect: WelcomeYouGo to my blog

<P> welcome <span style = "display: Block"> You </span> to my blog </P>

Effect: WelcomeYouGo to my blog

<P> welcome <span style = "display: none"> You </span> to my blog </P>

Effect: Welcome to my blog

<P> welcome <span style = "visibility: hidden"> You </span> to my blog </P>

Effect: Welcome to my blog

<P> welcome <span style = "display: visible"> You </span> to my blog </P>

Effect: WelcomeYouGo to my blog

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.