당신은 당신의 코드를 변경했습니다 : CSS에서,
<div id="button">
<a href="#"> </a>
</div>
그리고 : SEO 목적으로
#button
{
width: /* image width goes here */px;
height: /* image heightgoes here */px;
}
#button a
{
display:block;
background-image: url('button.png');
text-decoration:none;
}
#button a:hover
{
background-image: url('button2.png');
}
, 당신은 또한 <a>
내부의 텍스트를 쓸 수 있습니다처럼 :
<div id="button">
<a href="#">Title of the link</a>
</div>
#button
{
overflow:hidden;
text-indent:-999px;
width: /* image width goes here */px;
height: /* image heightgoes here */px;
}
또는 이러한 방법 : 때부터
#button
{
overflow:hidden;
width: /* image width goes here */px;
height: /* image heightgoes here */px;
}
#button a
{
...other rules
padding-left:/* a value higher than #button width */px;
}
그 '버튼을 만드는 평범한 구식 방법'0 그럼이 방법을 숨길? –
예, 링크를 만드는 일반적인 방법입니다. 그리고 그 모든 것이 평범하지는 않습니다. 그렇다고해서 사람들이 이것을 downvote해야만하는 것은 아닙니다. – DanMan
오, 그저 무고한 구절 인 것만으로 모든 사람이 나를 따라 잡아야한다는 뜻은 아닙니다 ... –