Textarea在ie中垂直调整大小

use*_*208 7 css

如何在IE中垂直调整我的textarea?

我做了调整大小:垂直,它在Firefox中运行良好,但在IE中它不起作用.那么有什么替代方案呢?

此外,如果我想打印页面,那么我需要textarea扩展和打印框中的所有内容.我该怎么用?

编辑 -

我的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%;
}
Run Code Online (Sandbox Code Playgroud)

HTML -

<div class="field">
<textarea id="xp">
some text here
</textarea> 
</div>
Run Code Online (Sandbox Code Playgroud)

编辑 -

我仍然无法找到解决方案.有人可以帮忙吗?

TJ.*_*TJ. 11

IE尚未支持css resize属性.你可能想试试这个jquery ui插件:http://jqueryui.com/demos/resizable/.这是一个小提琴演示.

关于在IE中打印的第二个问题.尝试将以下CSS添加到media ="print"块:

textarea {
    overflow: visible;
}
Run Code Online (Sandbox Code Playgroud)


dra*_*nis 0

我不确定,但据我所知 Internet Explorer 不支持这一点。您可以使用 javascript 来实现这一点。这是一个类似于我现在输入的文本区域的 jquery 插件: http: //archive.plugins.jquery.com/project/TextAreaResizer