微信公众号搜"智元新知"关注
微信扫一扫可直接关注哦!

如何使用CSS“resize”将元素的大小调整为在Chrome上的初始高度/宽度的高度/宽度?

我刚才在Chromium上看到过

>如果调整大小,我无法将元素的大小调整到小于初始高度的高度:vertical或resize:both
>如果调整大小,我无法将元素的大小调整为小于初始宽度的宽度:horizo​​ntal或resize:both.

演示:http://jsfiddle.net/3rdj4/3

我看过w3c spec,我猜这个问题是由于这个原因:

The user agent may restrict the resizing range to something suitable,
such as between the original formatted size of the element,and large
enough to encompass all the element’s contents.

有没有办法,即使Chrome应用了上面的段落呢?

注意:我使用的是Chromium 30.0.1592.0(216775)

解决方法

我会说不(没有javascript).

Custom CSS to allow chrome textarea resize smaller than initial state?

The fact you cannot resize a textarea under its initial dimensions is reported as a bug (07001)

原文地址:https://www.jb51.cc/css/214415.html

版权声明:本文内容由互联网用户自发贡献,该文观点与技术仅代表作者本人。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌侵权/违法违规的内容, 请发送邮件至 dio@foxmail.com 举报,一经查实,本站将立刻删除。