Fieldset 不支持显示:table/table-cell [英] Fieldset does not support display: table / table-cell

查看:44
本文介绍了Fieldset 不支持显示:table/table-cell的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在尝试将 display: table 与 fieldset 一起使用,但它没有正确缩放.如果我将

更改为

,同样的事情也会起作用.

我尝试过 Safari 和 Firefox.

我错过了什么吗?

http://jsfiddle.net/r99H2/

解决方案

基本上,fieldset 的默认渲染实际上并不能用 CSS 来表达.因此,浏览器必须以非 CSS 术语来实现它,这会干扰 CSS 对元素的应用.

几乎所有无法使用纯 CSS 重新创建的元素都会出现此类问题.

I'm trying to use display: table with fieldset, but it's not scaling properly. The same thing works if I change <fieldset> to <div>.

I tried with Safari and Firefox.

Am I missing something?

http://jsfiddle.net/r99H2/

解决方案

Basically, the default rendering of fieldset can't actually be expressed in CSS. As a result, browsers have to implement it in non-CSS terms, and that interferes with application of CSS to the element.

Pretty much any element that can't be recreated using pure CSS will have issues of that sort.

这篇关于Fieldset 不支持显示:table/table-cell的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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