嘗試用CSS居中按鈕。但是,每當我使用display:block和margin:0 auto;我在按鈕文字下獲得文字裝飾。CSS中的中心按鈕
.app-download .btn {
display: block;
margin: 0 auto;
text-decoration: none;
text-shadow: 0 1px 2px rgba(0, 0, 0, 0.6);
font-family: "News Cycle", sans-serif;
font-size: 1.5em;
border-radius: 5px;
color: #ffffff;
background: steelblue;
width: 400px;
padding: 20px 0;
}
.app-download .btn:hover {
background: tomato;
text-decoration: none;
}
我的HTML
<div class="app-download">
<div class="container">
<a href="#"><button type="button" class="btn">Download for iPhone</button></a>
<a href="#"><button type="button" class="btn">Download for Android</button></a>
</div>
</div>
我怎麼能中心的按鈕沒有得到一個文本的裝飾之下?
*無*獲取文本裝飾? – Cilan