Text-indent:-99999px deep analysis in css

Source: Internet
Author: User

However, as search engines become smarter, they gradually learn our methods and do not know what we think we are deliberately hiding from users (& larr ;_& larr ;), this causes your website to lose points in the search engine.
Alt

What should we do? We can use an old method to replace the text with an img tag:

 

The code is as follows: Copy code

At this time, do you feel like you are being pitted? This article is basically nonsense. No!
Text-indent

The problem with the new method is returned to text-indent. Since-99999px will be identified, you can find another way to use text-indent:
 

The code is as follows: Copy code

H1.logo {
Text-indent: 100%;/* indent it out of the element itself */
White-space: nowrap;/* disable text wrapping */
Overflow: hidden;/* Hide the accumulated text */
Background: url ("images/logo.jpg") no-repeat center;/* put a well-designed Logo image ~ */
}

Is it possible to solve the problem perfectly ~

 

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.