How can I use CSS `resize` to resize an element to a height/width less than initial height/width on Chrome?

前端 未结 4 2172
广开言路
广开言路 2020-12-06 10:34

I have just seen that on Chromium

  • I can\'t resize an element to a height smaller than its initial height in case of resize:vertical or resiz
4条回答
  •  心在旅途
    2020-12-06 11:19

    How about adding a min-height/max-height?

    This allows it to be set beyond the initial.

    http://jsfiddle.net/Dqxua/

    #wrapper {
        min-height:200px;
        max-height: 400px;
        resize: vertical;
        overflow: auto;
        border: 1px solid #000;
    }
    

提交回复
热议问题