这里是我的CSS为什么这个CSS按钮与<a>标签混淆?
button {
border: 0 none;
cursor: pointer;
padding: 0 15px 0 0;
text-align: center;
height: 30px;
line-height: 30px;
width: auto;
}
button a {
color:white;
text-decoration:none;
}
button.rounded {
background: transparent url(/images/button/btn_right.png) no-repeat scroll right top;
clear: left;
font-size: 0.8em;
}
button span {
display: block;
padding: 0 0 0 15px;
position: relative;
white-space: nowrap;
height: 30px;
line-height: 30px;
}
button.rounded span {
background: transparent url(/images/button/btn_left.png) no-repeat scroll left top;
color: #FFFFFF;
}
button.rounded:hover {
background-position: 100% -30px;
}
button.rounded:hover span {
background-position: 0% -30px;
}
button::-moz-focus-inner {
border: none;
}
这里是我的“按钮”,在它的链接代码。
<button class="rounded"><span><a href="profile.php">Profile</a></span></button>
问题是它没有链接到我点击它时的href。 任何人都知道为什么?
单词配置文件在按钮内。单击按钮内的任何位置都会得到相同的结果。 – 2010-06-14 20:20:53