首页 > 开发 > CSS > 正文

如何更好地控制input输入框的高度

2024-07-11 08:47:16
字体:
来源:转载
供稿:网友
很久以前 Roger Johansson 就在他的 blog 上做了一个 用样式控制表单元素 的测试 , 告诉我们企图用样式控制表单元素是一件不可能的事情using CSS to style form controls to look exactly the same across browsers and platforms is impossible
甚至 css2.1 规范中也没有明确这方面的规定 , 而是打算将它 fix in future
CSS 2 . 1 does not define which properties apply to form controls and frames, or how CSS can be used to style them. User agents may apply CSS properties to these elements. Authors are recommended to treat such support as experimental. A future level of CSS may specify this further.
所以如果想要让表单元素在各个浏览器下完全一致 , 最好的解决方法莫过于完全不理会操作系统的样式 , 用自定义的 ui 风格 , 就像 bing 或 Google 的 Jazz UI 那样
发表评论 共有条评论
用户名: 密码:
验证码: 匿名发表