【问题标题】:How to link fixed images on Tumblr CSS?如何在 Tumblr CSS 上链接固定图像?
【发布时间】:2015-01-22 16:38:17
【问题描述】:
对于我的 Tumblr 主题,我希望将这 4 个固定图像放在屏幕右侧以链接到另一个页面。
My Tumblr's link.
这是其中 1 张图片的 HTML:
<img src="http://i851.photobucket.com/albums/ab71/rachelala101/fandomsbuttons1-1_zps43ab3b55.png" id="icon1" width="90px">
这是它的 CSS:
#icon1 {
display:block;
position:fixed;
right:20px;
top:60px;
z-index:130
}
我尝试使用标签链接它,但图像完全消失了。
【问题讨论】:
标签:
css
image
hyperlink
linker
tumblr
【解决方案1】:
欢迎来到 StackOverflow,
您应该使用您提到的标记锚a。这是一个工作示例,请将 # 替换为您的链接。
<ul>
<li><a href="#"><img src="http://i851.photobucket.com/albums/ab71/rachelala101/fandomsbuttons1-1_zps43ab3b55.png" id="icon1" width="90px" class="icon1_rollover"/></a></li>
<li><a href="#"><img src="http://i851.photobucket.com/albums/ab71/rachelala101/fandoms%20buttons%201-1-2_zpsynh4farl.png" id="icon2" width="90px" class="icon2_rollover"/></a></li>
<li><a href="#"><img src="http://i851.photobucket.com/albums/ab71/rachelala101/fandomsbuttons1-3_zps10c8734d.png" id="icon3" width="90px" class="icon2_rollover"/></a></li>
</ul>
css
ul {
list-style: none;
position:fixed;
right:20px;
top:60px;
z-index:130;
}
a {
text-decoration: none;
}
a:hover {
text-decoration:none;
}
您可能想阅读此tutorial。
顺便说一句,不错的博客。