resize 属性

186 阅读1分钟

resize: both | vertical | horizontal | none 开启resize功能,允许用户调整大小

必须配合overflow: auto | hidden | scroll 使用,才能生效

问题:在 谷歌浏览器 v76版本,指定overflow: hidden,能够正常展示拖拉图标, 但是如果元素内容溢出则会遮住拖拉图标,导致无法调整大小,但是设置auto或者scroll 仍可以访问。在96版本则不会出现以上情况。

源自:codemirror 插件需要支持调整大小。 github.com/codemirror/…

Set the css style { resize: vertical, overflow: auto | scroll | hidden } of [class='CodeMirror'],you can turn on the css3 resize function.

But I ran into a problem in Google Chrome version 76 after set css style { overflow: hidden },the drag icon will be obscured by [class='CodeMirror-scroll'],so that the size cannot be changed. Set css style { overflow: auto | scroll } can change resize, but Codemirror display effect is not good.

In Google Chrome version 96, that is normal.