css链接按钮示例...
时间:2010-08-05 来源:yousuf007
#elButton1 a /*关闭button(使<a>有<button>的效果)*/
{
background: transparent url('../../Content/Images/button_bg.jpg') no-repeat scroll top right;
text-decoration: none;
width:80px;
padding-left:100px;
padding-bottom:20px;
cursor:default;
}
#elButton1 a:hover /*发布新闻button(使<a>有<button>的效果)*/
{
background: transparent url('../../Content/Images/button_bg_over.jpg') no-repeat scroll top right;
}
这样,在页面中可以减少JS代码,只下面一行代码就OK:
<%= Html.ActionLink(" ", "Index", new { id = Model.sid })%>
这个链接既有按钮的样式,又有<a></a>的特性,可以实现.net MVC中的action跳转!
相关阅读 更多 +
排行榜 更多 +