我在鏈接影像精靈時遇到了困難。我希望它們指向特定的網站,但是當我單擊影像精靈時,它根本不起作用。所有的影像精靈都是這樣的嗎?是否有替代解決方案?
<div class="footer1">
<div class="fb"><a href="#"></a></div>
<div class="ig"><a href="#"></a></div>
<div class="yt"><a href="#"></a></div>
<div class="twt"><a href="#"></a></div>
<div class="pin"><a href="#"></a></div>
</div>
CSS:
.fb {
background: url('../images/sites.png') no-repeat -79px -109px;
width: 302px;
height: 302px;
}
.ig {
background: url('../images/sites.png') no-repeat -459px -110px;
width: 307px;
height: 307px;
}
.yt {
background: url('../images/sites.png') no-repeat -852px -115px;
width: 299px;
height: 299px;
}
.twt {
background: url('../images/sites.png') no-repeat -1244px -114px;
width: 295px;
height: 293px;
}
.pin {
background: url('../images/sites.png') no-repeat -1632px -112px;
width: 293px;
height: 293px;
}
uj5u.com熱心網友回復:
在超鏈接中添加 div
<div class="footer1">
<a href="#">
<div class="fb">
</div>
</a>
<a href="#">
<div class="ig">
</div>
</a>
<a href="#">
<div class="yt">
</div>
</a>
<a href="#">
<div class="twt">
</div>
</a>
<a href="#">
<div class="pin">
</div>
</a>
</div>
uj5u.com熱心網友回復:
<div class="fb"><a href="**Enter specific Link Here**"></a></div>
您需要在 href 屬性中提供特定鏈接,例如www.facebook.com
uj5u.com熱心網友回復:
將鏈接粘貼到 href="" 示例中
<a href="https://facebook.com/user...."><div ></div></a>
并放置 img<div>標簽內部<a>標簽為您單擊它重定向的 div
在相應的社交媒體中獲取您的鏈接 https://www.facebook.com/username
轉載請註明出處,本文鏈接:https://www.uj5u.com/yidong/411883.html
標籤:
上一篇:我嘗試在htmlcssjs中的小應用程式上更改背景顏色
下一篇:最小高度不擴大
