首页 > 为什么修改textarea的text-align:center;在chrome中显示不正常,而在其他浏览器显示正常?

为什么修改textarea的text-align:center;在chrome中显示不正常,而在其他浏览器显示正常?

为什么修改textarea的text-align:center;在chrome中显示不正常,而在其他浏览器显示正常?

以下是代码

<!DOCTYPE html>
<html lang="zh-CN">
<head>
<style>
html{margin:0 auto;text-align:center;}
body{max-width: 900px;margin:0 auto;}
textarea{width:200px;height: 200px;}
button {width: 200px;text-align: center;}
.div1{width:200px;height:200px;background-color: aqua;margin: 0 auto;}
</style>
</head>
<body>
<div ><textarea  title="leaveMessage" Class="formInput"  name="leaveWords"></textarea>
<br>
<button class="formButton">    留言</button>
<div class="div1"><p>you need cry dear</p></div>
</div>
</body>

在火狐是这样的

在chrome却是这样的

其他浏览器都是正常的或者差异不明显的

而且无论采取何种布局,textarea永远会多出一点点。
why?为什么会这样?是我的浏览器出问题 了吗?


textarea默认自带padding和border

【热门文章】
【热门文章】