<style>
html {
text-align: center;
}
input, button {
width: 300px;
height: 50px;
margin-top: 10px;
}
</style>
<html>
<form>
<input value="test" type="text">
<br>
<button>Test</button>
</form>
</html>
Microsoft Edgeでこのコードを試してもうまくいきますが、Webkitブラウザ(Operaなど)で試してみると、ボタンがシフトしています。 enter image description hereWebkitブラウザで入力とボタンをシフトさせずに中央に揃えるにはどうすればいいですか?
私はあなたのためにcodepenを作成しました:http://codepen.io/anon/pen/zoergPこれをChrome 55でテストしました。左の小さなスペースがあるので、Webkitの問題です。 –