Firefox textarea大小的bug? [英] Firefox textarea sizing bug?

查看:146
本文介绍了Firefox textarea大小的bug?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在尝试创建一个固定的文本区域,它只使用CSS来填充浏览器窗口的整个宽度和高度,并且以下在Chrome中完美地工作:

I'm attempting to create a fixed textarea that fills the entire width and height of the browser window using just CSS, and the following works perfectly in Chrome:

textarea {
    border: 2px solid #3D6AA2;
    padding: 5px;
    position: fixed;
    top:0;
    left:0;
    right:0;
    bottom:0;
    resize: none;
}

http://jsfiddle.net/BulletzBill/FZr9k/1/

但是,如果您查看小提琴在Firefox中,它似乎没有考虑到底部规则。这是一个已知的bug在firefox,或有任何解决方法吗?如果可能,我想避免使用javascript / window resize listeners。

However, if you view the fiddle in Firefox, it appears as though it does not take the bottom or right rules into account at all. Is this a known bug in firefox, or is there any workaround for it? I'd like to avoid using javascript/window resize listeners if possible.

推荐答案

http://jsfiddle.net/FZr9k/8/ =nofollow> jsfiddle

Here is an update to your jsfiddle

您需要使 width:100% height:100% box-sizing:border-box;

您只需要两个位置点顶部

You only need 2 position points top and left

这篇关于Firefox textarea大小的bug?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆