我可能错过了一些小事,但我现在很难搞清楚:
我在尾部有一个带有以下div的文档
<div style="position:fixed; display:block; width:300px; height:100px; top:30px; left:30px; background:#333;">
<textarea>
asdf
</textarea>
</div>
<canvas width="640" height="480"></canvas>
每当我在textarea中输入几十行文字时,当我退格时,我的固定定位就会脱离钩子并向右推/向下推动约250-350px。请注意,当退回到换行符时,会发生这种情况。非常奇怪的错误(通过铬)。
答案 0 :(得分:0)
试试这个:( textarea之间没有空格)
<div style="position:fixed; display:block; width:300px; height:100px; top:30px; left:30px; background:#333;">
<textarea>asdfWhenever I enter a few dozen lines of text into the textarea, when I backspace my fixed positioning goes off the hook and pushes everything to the right / down about 250-350px. Note that this specifically happens when backspacing into a line break. Very weird bug (via chrome).</textarea>
</div>
<canvas width="640" height="480"></canvas>