我正在尝试链接图像,在 html 中如下所示:
<a href="#" class="image"><img src="logo.png"></a>
在 CSS 中我有:
.baraMeniu a.image{
display:block;
}
是的... display:block 只是使图像可点击的尴尬尝试。我是初学者,所以请一步一步来。
编辑:我忘了说我的图像具有以下属性:
.baraMeniu img{
width:100%;
height:40em;
position:absolute;
z-index:0;/*the image*/
}
.baraMeniu a.image{
/*the clickable image*/
}
.baraMeniu .st{
font-size:2em;
padding-top:0.15em;
padding-left:0.7em;
padding-right:0.5em;
color:orange;
font-family:'Century Gothic', CenturyGothic, AppleGothic, sans-serif;
display:inline;
text-decoration:none;
float:left;
}
.baraMeniu .dr{
font-size:2em;
padding-top:0.15em;
padding-left:0.7em;
padding-right:0.5em;
color:orange;
font-family:'Century Gothic', CenturyGothic, AppleGothic, sans-serif;
display:inline;
text-decoration:none;
float:right;
}
.baraMeniu #ind{
text-indent:20px;
}