加入收藏 | 设为首页 | 会员中心 | 我要投稿 李大同 (https://www.lidatong.com.cn/)- 科技、建站、经验、云计算、5G、大数据,站长网!
当前位置: 首页 > 综合聚焦 > 资源网站 > 资源 > 正文

html – 如果输入元素是内联元素,为什么可以调整它们的大小?

发布时间:2020-12-14 23:48:39 所属栏目:资源 来源:网络整理
导读:我的印象是内联元素的高度不能调整大小,但我可以使用 input type =“text”/来实现.元素. 我是否正确 input type =“text”/元素是内联的吗? 如果是这样,那么是什么使它们与 span / span不同他们如何能够或不能调整大小的元素. 解决方法 默认情况下, input
我的印象是内联元素的高度不能调整大小,但我可以使用< input type =“text”/>来实现.元素.

我是否正确< input type =“text”/>元素是内联的吗?

如果是这样,那么是什么使它们与< span>< / span>不同他们如何能够或不能调整大小的元素.

解决方法

默认情况下,input元素是内联块,而不是内联.

另一方面,默认情况下,诸如span之类的元素是内联的.

内联块元素的宽度/高度(例如input)可以更改为(example).

虽然默认情况下无法更改内联元素(例如span),因为其维度由“其中的呈现内容”定义. (example).

This [width] property does not apply to non-replaced inline elements. The content width of a non-replaced inline element’s boxes is that of the rendered content within them (before any relative offset of children). Recall that inline boxes flow into line boxes. The width of line boxes is given by the their containing block,but may be shorted by the presence of floats. 07006

(编辑:李大同)

【声明】本站内容均来自网络,其相关言论仅代表作者个人观点,不代表本站立场。若无意侵犯到您的权利,请及时与联系站长删除相关内容!

    推荐文章
      热点阅读