css resize attribute


  Translation results:

resize

UK [ˌri:ˈsaɪz] US [,ri'saɪz]

v.Resize

css resize attributesyntax

What does resize mean?

resize is a property in CSS that is used to specify whether the size of an element can be adjusted by the user; it needs to be used together with the overflow attribute.

Function: The resize attribute specifies whether the size of the element can be adjusted by the user.

Syntax: resize: none|both|horizontal|vertical;

Description: none The user cannot resize 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.

Note: If you want this attribute to take effect, you need to set the overflow attribute of the element. The value can be auto, hidden or scroll.

css resize attributeexample

<!DOCTYPE html>
<html>
<head>
<style> 
div
{
border:2px solid;
padding:10px 40px; 
width:300px;
resize:both;
overflow:auto;
}
</style>
</head>
<body>
<div>resize 属性规定是否可由用户调整元素尺寸。</div>
<p><b>注释:</b> Firefox 4+、Safari 以及 Chrome 支持 resize 属性。</p>
</body>
</html>
Run instance »

Click the "Run instance" button to view the online instance

Home

Videos

Q&A