我希望我的锚标签看起来像一个按钮,并创建了这个样式
JsFiddle
.details-button { background: linear-gradient(to bottom,#FFFFFF 0,#FAB149 2%,#F89406 100%) repeat scroll 0 0 transparent; border: 1px solid #FAB149; -ms-border-radius: 3px; border-radius: 3px; -webkit-Box-shadow: 0 1px 2px #999999; -ms-Box-shadow: 0 1px 2px #999999; Box-shadow: 0 1px 2px #999999; color: #FFFFFF; cursor: pointer; font-family:"Helvetica Neue",Helvetica,Arial,sans-serif; font-size: 13px; font-weight: bold; -ms-text-shadow: 0 -1px #099FDF; text-shadow: 0 -1px #099FDF; margin: 4px; height: 28px; width: 85px; vertical-align: central; align-items: center; text-decoration: none; font: menu; display: inline-block; /*padding: 6px 0 5px 18px;*/ }
解决方法
加
text-align: center; line-height: 28px;