Style resize Property

Style 对象参考手册Style Object

Examples

Specify whether the user can adjust the size of the div element:

document.getElementById("myDIV").style.resize="both";

Definition and Usage

The resize property specifies whether the size of an element can be adjusted by the user.

Note:The resize property only works when the element's overflow property is not set to "visible". In other words, if you want the resize property to take effect, you need to set the element's overflow property to auto, hidden, or scroll.


Browser Support

Internet Explorer Firefox Opera Google Chrome Safari

Firefox, Chrome, and Safari support the resize property.


Syntax

Return the resize property:

object.style.resize

Set the resize property:

object.style.resize="none|both|horizontal|vertical|initial|inherit"

Property Values

Value Description
none Default value. The user cannot adjust the size of the element.
both The user can adjust the height and width of the element.
horizontal The user can adjust the width of the element.
vertical The user can adjust the height of the element.
initial Sets this property to its default value. Seeinitial。
inherit Inherits this property from its parent element. Seeinherit。

Technical Details

Default value: none
Return value: A string, representing the element's resize property.
CSS Version CSS3


Related Articles

CSS Reference:resize property


Style 对象参考手册Style Object

Other Extensions