0

我正在尝试使我的输入字段可调整大小,但我发现的代码不再起作用。

#mededeling 
{
resize: both;
}

有人知道最新的工作代码吗?

4

2 回答 2

1

使用 textarea 代替 input 怎么样?1row height textarea 看起来就像 input type[text] 并且可以以表单形式提交:

textarea name="" id="" cols="30" rows="1"
于 2013-04-24T15:59:45.600 回答
0
<style>
    input {
        resize: horizontal;
        width: 200px;
    }

    input:active {
        width: auto;   
    }

    input:focus {
        min-width: 200px;
    }
</style>  
于 2017-03-02T20:17:59.140 回答