In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-01-16 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Development >
Share
Shulou(Shulou.com)06/01 Report--
This article mainly introduces how to use CSS style to hide content in Html, which is very detailed and has certain reference value. Friends who are interested must finish reading it!
How to use CSS style in Html to hide content without affecting the use of code functionality.
We often want to hide some content, such as adding icons displayed by third-party statistics on the website, how to hide through CSS, but does not affect the statistics of the site, how to make the picture as the background, but the text does not show, how to hide and so on. To share with you.
I. ordinary hidden web page content
CSS style word: display:none
If we want to hide a piece of statistical code, but do not want to show the statistical code icon without affecting the statistical function, we can use the CSS-style word display:none (which means no object and object content).
CSS Code:
.tongji {display:none}
HTML fragment:
Hide content
Description: this DIV CSS is hidden, object DIV and object content will be hidden, but the function will not be affected. For search engines, whether you use this style within the tag or generally separate CSS and HTML from this instance, search engines will not read and index your hidden content, for friends who hide keywords, do not use this CSS hiding way to hide keywords or anchor text links, otherwise it is just futile.
Second, the picture serves as the background and hides the text on the picture without affecting the A hyperlink anchor text.
We usually encounter that we want to use the picture as the object background, the content is optimized with text + hyperlink, and at the same time we want to hide the text, and the hyperlink is not affected, so as to optimize the web page. that is, it does not affect the beauty and achieves the effect of search engine optimization.
Key CSS style used: text-indent:-9999px
The above is all the content of this article entitled "how to use CSS style to hide content in Html". Thank you for reading! Hope to share the content to help you, more related knowledge, welcome to follow the industry information channel!
Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.
Views: 0
*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.
Continue with the installation of the previous hadoop.First, install zookooper1. Decompress zookoope
"Every 5-10 years, there's a rare product, a really special, very unusual product that's the most un
© 2024 shulou.com SLNews company. All rights reserved.