我在JSP页面上设置了两个按钮:
<input type="submit" value="登 录" style="width:100px;" class="button_blue"/>
<input type="button" value="注 册" style="width:100px;" class="button_green" onclick="javascript:location.href='register.jsp'"/>
采用了外联式的css,css文件中的配置如下:
.button_blue
{
display:inline-block;
float:left;
height:41px;border-radius:4px;
background:#2795dc;border:none;cursor:pointer;
border-bottom:3px solid #0078b3;*border-bottom:none;
color:#fff;
font-size:16px;padding:0 10px;*width:140px;
text-align:center;outline:none;font-family: "Microsoft Yahei",Arial, Helvetica, sans-serif;
}
input.button_blue:hover
{
background:#0081c1;
border-bottom:3px solid #006698;*border-bottom:none;
color:#fff;
text-decoration:none;
}
.button_green
{
display:inline-block;
float:left;
height:41px;border-radius:4px;
background:#aef055;border:none;cursor:pointer;
border-bottom:3px solid #46a60d;*border-bottom:none;
color:#fff;
font-size:16px;padding:0 10px;*width:140px;
text-align:center;outline:none;font-family: "Microsoft Yahei",Arial, Helvetica, sans-serif;
}
input.button_green:hover
{
background:#46a60d;
border-bottom:3px solid #40741d;*border-bottom:none;
color:#fff;
text-decoration:none;
}
但是运行效果却是这样
登录按钮有效果,但注册按钮没有应用到css中的样式,但当我将注册按钮的样式直接定义在head部分的标签中时,效果是可以显示的,请问为什么会出现这种情况?</p>