How to force free CSS resize on input element when its width is specified?

后端 未结 4 1329
刺人心
刺人心 2021-02-05 15:30

I have simple problem - text input element which has specified 2 CSS attributes, see code below:



        
4条回答
  •  逝去的感伤
    2021-02-05 16:03

    The simple way to make an input resize freely is to set it to it to have width: 100%, and then place it inside an inline-block container with a min-width (min-width sets the default width for the input). Resize the container to resize the input.

    See: http://jsfiddle.net/Wexcode/TvZAr/

提交回复
热议问题