为什么修改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?为什么会这样?是我的浏览器出问题 了吗?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
textarea默认自带padding和border