我正在尝试将一个类应用于以下提交按钮 代码:
<input type="submit" value="Submit" name="commit" class="confirm-button-submit ">
样式:
.confirm-button-submit
{
width : 79px;
font : bold 12px sans-serif;;
color : #000;
background : url("../images/confirm-btn.png") 0 -33px no-repeat;
text-decoration : none;
margin-top :0px;
text-align:center;
border:0px;
cursor : pointer;
height:170px;
}
.confirm-button-submit a
{
width : 79px;
font : bold 12px sans-serif;;
color : #000;
background : url("../images/confirm-btn.png") 0 -33px no-repeat;
text-decoration : none;
margin-top :0px;
text-align:center;
border:0px;
cursor : pointer;
height:170px;
}
.confirm-button-submit a:hover
{
width : 79px;
font : bold 12px sans-serif;;
color : #000;
background : url("../images/confirm-btn.png") 0 0 no-repeat;
text-decoration : none;
margin-top :0px;
text-align:center;
border:0px;
cursor : pointer;
height:170px;
}
但是它不能正常工作怎么办
谢谢
最佳答案
我假设您打算应用 .confirm-button-submit
的 CSS 规则,但您的按钮没有该类。
你必须使用:
<input type="submit" value="Submit" name="commit" class="confirm-button-submit" />
关于html - 类不适用于提交按钮,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/3007813/