谁能帮我理解为什么“ 7”这个文本值不居中吗?

<input id="button7" value="7" onclick='Calc.Input.value += "7"' type="button" class="button"/>


对于Web版本,7是居中的,但通过媒体查询不是移动版本。

我的媒体查询CSS仅是;

@media only screen and (min-device-width : 320px) and (max-device-width : 568px) {

.set_1 {
  height: 270px;
  width: auto;
}

.set_2 {
  height: 266px;
  width: auto;
}

.set_3 {
  height: 266px;
  width: auto;
}

.set_4 {
  height: 266px;
  width: auto;
}

.set_5 {
  height: 266px;
  width: auto;
}

.text_box{
  height: 180px;
  width: 730px;
  font-size: 100px;
}

.button {
  height:200px;
  width:200px;
  font-size: 100px;
  text-align: center;
}

}

最佳答案

加:

display: block;


我相信....

关于javascript - 我的值(value)不会使文本居中对齐,我们在Stack Overflow上找到一个类似的问题:https://stackoverflow.com/questions/20411527/

10-12 00:17
查看更多