-2
使用display: block
來中心IE上的按鈕是否正確,或者我應該尋找一種在其他瀏覽器上使用WebKit-center的方法嗎?webkit Center for IE和Edge
@media screen and (max-width: 767px) {
.flex {
display:inline-block;
}
.flex_height {
display:inline-block;
}
.grid_8 {
background-repeat:no-repeat;
width:98%;
margin-left:1%;
margin-right:1%;
text-align:-webkit-center;
text-align:-moz-center;
margin-left:auto;
margin-right:auto;
}
}
<div class="grid_8">
<button type="button" class="button_home mobile_on">
*php code to generate text for a button here*
</button>
</div>
爲什麼不'文本對齊:中心;'? –
試過,按鈕不動 – dovefromhell
您的css與html無關 – Morpheus