我附上了按鈕的圖像。在我正在使用的網站上只有這個圖像。它沒有PSD或PNG,所以我不確定哪種字體系列和大小。我被要求創建類似於到該圖像,多次嘗試後的CSS,而不是被設計和CSS的傢伙,我想出了這個CSS3
.test
{
border-top: 1px solid;
background: #ebebeb;
background: -webkit-gradient(linear, left top, left bottom, from(#ebebeb), to(#ebebeb));
background: -webkit-linear-gradient(top, #ebebeb, #ebebeb);
background: -moz-linear-gradient(top, #ebebeb, #ebebeb);
background: -ms-linear-gradient(top, #ebebeb, #ebebeb);
background: -o-linear-gradient(top, #ebebeb, #ebebeb);
padding: 5px 10px;
-webkit-border-radius: 3px;
-moz-border-radius: 3px;
border-radius: 3px;
-webkit-box-shadow: #ebebeb 0 1px 0;
-moz-box-shadow: #ebebeb 0 1px 0;
box-shadow: #ebebeb 0 1px 0;
text-shadow: #ebebeb 0 1px 0;
color: #4d4c4d;
font-size: 12px;
font-family: font-family: Arial,sans-serif;
font-weight:lighter;
text-decoration: none;
vertical-align: middle;
}
但字體大小和回地面仍有點過。我想這可能是一些css3大師在這裏有我的答案,我錯過了什麼是完全相同的副本?
這裏是我的小提琴http://jsfiddle.net/Fbpg6/
這是非常接近,但文字太淺。謝謝 – Autolycus 2012-02-02 04:24:40
你可以改變'顏色:'屬性來使文本變暗......更新在這裏:http://jsfiddle.net/NotInUse/Fbpg6/21/ – Scott 2012-02-02 04:26:54
謝謝!!那做了這個工作 – Autolycus 2012-02-02 04:29:48