[英]Textarea style is auto covered by element.style
In my aspx page, I have a textarea: 在我的aspx页面中,我有一个文本区域:
<div style=" position: absolute; top: 45px; bottom: 5px;
left: 5px; right: 5px">
<textarea id="code" name="code" runat="server" wrap="off" style="clear: both; width:99%; height:99%" >
</textarea>
</div>
All I want is the Textarea auto display full the browser. 我想要的只是在浏览器中自动显示Textarea。 But when I built the page, the text area just display small in the left browser screen.
但是,当我构建页面时,文本区域在浏览器的左侧屏幕上显示的很小。
Try to press F12, the Textarea tag is changed: 尝试按F12键,Textarea标签被更改:
<textarea id="code" name="code" runat="server" wrap="off" style="display:block" > </textarea>
Really tired, I met this situation for many times. 真的很累,我多次遇到这种情况。 Sometimes, I add
style= "clear:both"
but in this situation, it cannot help. 有时,我添加
style= "clear:both"
但是在这种情况下,它无济于事。
The Textarea 's style is just contain: display:block
Textarea的样式仅包含:
display:block
I copy my code to http://jsfiddle.net/REgjn/ ---> it display as the way I expected: the textarea is fill full the chrome browser. 我将代码复制到http://jsfiddle.net/REgjn/ --->以我期望的方式显示:textarea充满了chrome浏览器。 But it is not when I built it on the real browser.
但是不是在真正的浏览器上构建时。
Help!!! 救命!!! Why is the TextArea tag changed???
为什么TextArea标签更改了???
I have modified your code. 我已经修改了您的代码。 I hope it will work
我希望它能起作用
<div style=" position: absolute; top: 45px; bottom: 5px;
left: 5px; right: 5px;width:99%; height:99%">
<textarea id="code" name="code" runat="server" wrap="off" style="clear: both; width:99%; height:99%" >
</textarea>
</div>
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.