HTML DOM Style resize property
Examples
Predetermined by the user can adjust the size of the div element:
document.getElementById("myDIV").style.resize="both";
Definition and Usage
resize property specifies whether the user can adjust the size of the element.
Note: resize attribute overflow property works only if the element is not "visible".That is, if you want to resize property to take effect, you need to set the value of auto overflow attribute elements, hidden or scroll.
Browser Support
Firefox, Chrome and Safari support resize property.
grammar
Back resize attributes:
object .style.resize
Setting resize properties:
object .style.resize="none|both|horizontal|vertical|initial|inherit"
Property Value
值 | 描述 |
---|---|
none | 默认值。用户无法调整元素的尺寸大小。 |
both | 用户可调整元素的高度和宽度。 |
horizontal | 用户可调整元素的宽度。 |
vertical | 用户可调整元素的高度。 |
initial | 设置该属性为它的默认值。请参阅 initial 。 |
inherit | 从父元素继承该属性。请参阅 inherit 。 |
technical details
Defaults: | none |
---|---|
return value: | String representing the resize attribute element. |
CSS version | CSS3 |
related articles
CSS Reference: of a resize attribute