Textarea在IE中垂直调整大小 [英] Textarea resize vertical in ie
问题描述
我如何在IE中垂直调整文本区域的大小?
How do i resize my textarea vertically in IE?
我确实调整了大小:垂直,在Firefox中效果很好,但在IE中不起作用。那么,还有什么选择呢?
I did resize: vertical and it works well in Firefox but in IE it doesn't work. So what's the alternative for this?
此外,如果我要打印页面,则需要textarea扩展并打印框中的所有内容。我应该为此使用什么?
Also, if I want to print the page, then I need the textarea to extend and print the whole contents in the box. What should I use for this?
编辑-
我的CSS:
@media screen {
textarea {
resize: vertical;
overflow: auto;
border: 1px #999999 solid;
padding: 6px;
background: #ffffff url('../images/field_bg.png') repeat-x bottom;
width: 400px;
height: 100px;
}
}
@media print {
textarea {
border: 1px #999999 solid;
padding: 6px;
background-color: #ffffff;
background-image : none;
width: 400px;
height: auto;
overflow: visible;
}
}
.field {
display: inline;
vertical-align: top;
width: 25%;
}
HTML-
<div class="field">
<textarea id="xp">
some text here
</textarea>
</div>
编辑-
我仍然可以t找出解决方案。有人可以帮忙吗?
I still can't figure out the solution for this. Can anybody help please?
推荐答案
IE尚不支持css resize属性。您可能想尝试以下jquery ui插件: http://jqueryui.com/demos/resizable/ 。这是一个小提琴进行演示。
The css resize property is not (yet) supported by IE. You may want to try this jquery ui plugin: http://jqueryui.com/demos/resizable/. Here's a fiddle to demonstrate.
第二次有关在IE中打印的问题。尝试将以下CSS添加到media = print块中:
For your second question regarding printing in IE. Try add the following CSS to the media="print" block:
textarea {
overflow: visible;
}
这篇关于Textarea在IE中垂直调整大小的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!