CSS3 magic Hall: Prohibit users from changing the size of textarea

Source: Internet
Author: User

CSS3 magic Hall: Prohibit users from changing the size of textarea
I. Preface by default, users are allowed to change the size of textarea in the form of drag and drop in FF, Chrome, and Safari, which is different from that of textarea in IE, in addition, the size change of textarea will increase the parent node and damage the overall layout. 2. The reason is that the system calls window. getComputedStyle (textarea element, null). resize to return both. We can know that it was originally a ghost of the resize style attribute. 3. CSS3 Attribute-resize is used to set the mechanism for UserAgent to adjust the element size, that is, to set whether or how users can change the element size on their own. Value Range: none: UserAgent is not allowed to adjust the element size; both: Allows UserAgent to adjust the horizontal and vertical dimensions of elements; vertical: Allows UserAgent to adjust the vertical dimension of elements; horizontal: allows the UserAgent to adjust the horizontal dimension of the element. inherit: inherits the value of inherit when the parent element is resize in FF, Chrome, and Safari for div (in fact, it is none ), for textarea, the default value is both. Iv. Solution: Set resize: none for textarea

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.