开发者

css div height expender [duplicate]

This question already has an answer here: javascript resize with mouse (1 answer) Closed 9 years ago.

i'm trying to put an textarea expander on a div and i can't find the right element to set , here explanation 开发者_C百科of what i'm trying to do :

in the textarea input tags in the bottom corner there is expander for the user to set the size he wants hes textarea to be

my question is , is there a way to put something like that on a div? i don't looking for javascript code , css or html would be great.


Use CSS3 resize: both;, as seen here: http://dhtmlexamples.com/2011/01/20/creating-a-user-resizable-div-tag-using-css3/

<style type="text/css">
    .isResizable {
        background: rgba(255, 0, 0, 0.2);
        font-size: 2em;
        border: 1px solid black;
        overflow: hidden;
        resize: both;
        width: 160px;
        height: 120px;
        min-width: 120px;
        min-height: 90px;
        max-width: 400px;
        max-height: 300px;
    }
</style>

<div class="isResizable">The quick brown fox jumps over the lazy dog.</div>
0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜