Webpage tips: CSS with affinity to hide text

Source: Internet
Author: User

A new and more friendly introduction to CSS hidden text methods, explains why the existing several CSS hidden text methods are flawed and how the new methods can be compensated. It is generally practical, but this method is quite novel.
1. display: none;
The search engine may consider the hidden text to be spam and ignored.
Screen readers (programs designed to read screen content for visually impaired people) will ignore hidden text. 2. visibility: hidden;
We should be familiar with this, that is, the hidden content occupies the physical space that it should occupy.
3. overflow: hidden; a reasonable method

The code is as follows: Copy code
. Texthidden
{
Display: block;/* unified conversion to block-level elements */
Overflow: hidden;
Width: 0;
Height: 0;
}

As shown in the preceding section of CSS, setting the width and height to 0, and hiding more than half will make up for the defects in the first and second methods, it also achieves the purpose of hiding content.
Terms:
Accessibility)
Is a practice that makes it easier for people with disabilities to use applications.
The American Disabilities Act, dated 1990)
The Telecommunications Act of 1996)
Rehabilitation Act Amendment (Rehabilitation Act Amendments) 508 clause
Web Accessibility Initiative (WAI ))
These are accessible standards. For more information, see the Law and disabilities page.
Screen Reader)
It is a program designed to read screen content for visually impaired people.
Availability)
The convention that makes it easier for everyone to use applications. Accessibility is a type of availability.
Web Browser)
Displays any program on the Web page. Most Web browsers can display HTML pages, but some (such as browsers on mobile phones) may only display other types of pages, such as WML or cHTML.

Related Article

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.