CSS3中設定h2來實SEO優化
阿新 • • 發佈:2021-01-15
技術標籤:css3
<div class="sales-box">
<div class="sales-hd">
<h2>熱門活動</h2>
<a href="#" class="more">獲取更多福利</a>
</div>
</div>
/* sales-box */ .sales-box { border-top: 1px solid #bbb; background-color: #fff; margin: 4px; } .sales-hd { position: relative; height: 44px; border-bottom: 1px solid #ccc; } .sales-hd h2 { position: relative; text-indent: -999px; overflow: hidden; } .sales-hd h2::after { position: absolute; top: 5px; left: 8px; content: ""; width: 79px; height: 15px; background: url(../images/hot.png) no-repeat 0 -20px; background-size: 79px auto; }