我有一个用于提供建议的 textarea。下面是两张截图;一种在 Firefox 中,一种在 Chrome 中。Firefox 是正确的,我不确定为什么它在 Chrome 中显示不正确。谁能解释为什么会这样?它可以在本地 Chrome 中使用,但在我发布到 Azure 时则不能使用。
我的风格是:
#txtSuggestion {
position: relative;
font-size: 16px;
height: auto;
padding: 10px;
-webkit-box-sizing: border-box;
-moz-box-sizing: border-box;
box-sizing: border-box;
width: 500px;
height: 100px;
border: 3px solid #cccccc;
display: block;
margin-left: auto;
margin-right: auto;
}
Run Code Online (Sandbox Code Playgroud)
我在页面上的 div 是:
<div id="suggestion">
<h2 style="text-align:center;">Suggestion</h2>
<h3 style="text-align: center;" id="successText"></h3>
<textarea id="txtSuggestion" spellcheck="false"> </textarea>
<div style="text-align:center; padding-top: 20px;">
<span class="btn btn-sm btn-success" id="btnSubmit" onclick="SuggestionSubmit();">Submit</span>
</div>
</div>
Run Code Online (Sandbox Code Playgroud)