我认为我在这里做错了,我希望 textarea 在每一侧都比父 div 小 10px,但事实并非如此,它太小了:
<html>
<div style="position: absolute; left: 10px; top: 10px; width:50%; height: 50%; border: 1px solid #000000;">
<textarea style="position: absolute; left: 10px; top: 10px; bottom: 10px; right: 10px; border: 1px solid #FF0000; resize:none;"></textarea>
</div>
</html>
jsfiddle:http: //jsfiddle.net/2a7LR/1/
为什么会这样?我怎样才能使它适合从父 div 的每一侧小 10 像素?
它仅在 chrome/safari 中正确显示,但在其他所有浏览器(firefox、opera、IE8)中都错误