splay 标签 span indent width com 搜狐 lan ges
在h1标签里套入a标签并写上文字,有利于seo,但是文字如何隐藏呢?一般都是a标签变成内联块并首行缩进为负值。
- <!DOCTYPE html>
- <html lang="en">
- <head>
- <meta charset="UTF-8">
- <title>
- Document
- </title>
- <style type="text/CSS">
- .logo{ width: 143px; height: 76px; background: url("logo.png"); } a{ display:
- inline-block; text-indent:-5000em; }
- </style>
- </head>
- <body>
- <div class="logo">
- <h1>
- <a href="#">
- 搜狐
- </a>
- </h1>
- </div>
- </body>
- </html>
效果:
CSS——网页优化之内容移除
splay 标签 span indent width com 搜狐 lan ges
原文:http://www.cnblogs.com/wuqiuxue/p/7800183.html
来源: http://www.bubuko.com/infodetail-2384723.html