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 ~