前端LOGO SEO优化
步骤
- logo的div内放一个h1标签,目的是为了提权
- h1里面放一个链接,点击链接可以返回首页
- 在链接里面放相应的文字,但文字要隐藏
font-size: 0;/*方法1*/
text-indent:-9999px;
overflow:hidden;/*方法二*/
代码展示
<!-- logo模块 -->
<div class="logo">
<h1>
<a href="index.html" title="品优购商城">品优购商城</a>
</h1>
</div>
.logo a {
display: block;
width: 171px;
height: 61px;
background: url(../images/logo.png);
font-size: 0;
}