[CSS] Prohibit Google browser from allowing definition and adjustment of multi-line text boxes_html/css_WEB-ITnose

WBOY
Release: 2016-06-24 11:47:51
Original
1698 people have browsed it

As we all know, the multi-line text box Textarea cannot be adjusted casually, as shown below. If you want to adjust it, you have to write a lot of scripts:


This is good, because in many cases, we don't need to allow users to adjust the text box. Often we just need to set the col and row attributes and fix their size.

However, for Google Chrome, an ordinary:

<textarea></textarea>
Copy after login
can be easily adjusted as shown below:


This will mess up the layout of our page. Sometimes I don’t know what’s going on when debugging, and I think the style is not written well.

You can think of it as Google Chrome It's wrong, who told the user to mess around with this multi-line text box when they have nothing to do?

However, we can make it more perfect and add style="resize:none" at the end. Users will not be able to drag in Google Chrome, as shown in the right text box in the picture above.

The above two pictures are actually the following codes:

textareaResize<textarea></textarea>
Copy after login
You can see that style="resize:none" has no effect in IE.

source:php.cn
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template