CSS tips: CSS methods for hiding text (CSS text-indent: -9999px;)

Source: Internet
Author: User

 Build station over the process of friends like the site name with H1, but from the aesthetic considerations, to use logo images instead of H1, then need to hide the H1 within the text, but can not be unfriendly to the search engine, or lose the definition of H1 label meaning.  In the CSS how to use the word, find the CSS hidden text method, there are the following: 1, Display:none; It is common to say that search engines may think that the hidden text is spam and ignored, and does not preserve physical space for hidden objects. GG also search CSS files?    But if this method,

-9999px the browser to draw a 9999-wide box ... Will degrade some performance.

More efficient methods (tried, H1 can also be used):

. hide-text {
text-indent:100%;
White-space:nowrap;
Overflow:hidden;
}

From:http://ajhcc.blogbus.com/logs/41836252.html

CSS tips: CSS methods for hiding text (CSS text-indent: -9999px;)

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.