CSS——網頁優化之內容移除
阿新 • • 發佈:2017-11-07
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——網頁優化之內容移除