html - 如何控制标签标签的宽度?

标签 html css label

label标签没有'width'属性,如何控制label标签的宽度?

最佳答案

当然是使用 CSS...

label { display: block; width: 100px; }

width 属性已弃用,应始终使用 CSS 来控制这些类型的呈现样式。

关于html - 如何控制标签标签的宽度?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/2820586/

相关文章:

asp.net - 不同 <p> 标签上的不同 css 格式

html 类型编号不会重新定位

r - ggplot2 - 用 position = dodge 注释(标记)geom_boxplot

css - 错误标签的自动宽度

javascript - 是否可以在表单的标签内使用标签?

html - 在 li-style-element 上添加额外的空间

javascript - 必须在 css 文件中使用 PHP 运行计数器

html - 导航栏 HTML/CSS 样式

javascript - 使用@font-face 时 SVG node.getBBox 不正确

html - <img> 高度等于它在 div 中的宽度