【问题标题】:use cols/rows or style-width/height to specify dimensions of textarea? [duplicate]使用 cols/rows 或 style-width/height 来指定 textarea 的尺寸? [复制]
【发布时间】:2011-06-30 16:49:23
【问题描述】:

在指定 HTML 文本区域的尺寸时,最佳实践是什么?只使用 cols/rows (我认为这是 html strict 4.01 强制要求的)或使用 css 属性指定宽度和高度? 甚至设置 cols/rows 的有效性,然后使用 css 覆盖实际大小?

【问题讨论】:

    标签: html css textarea


    【解决方案1】:

    请看这个问题:Should I size a textarea with CSS width / height or HTML cols / rows attributes?

    我同意最佳答案。如果不支持 CSS,请使用 rows/cols;如果使用 CSS 指定宽度或高度,它们会覆盖从行/列派生的值。

    【讨论】:

      猜你喜欢
      • 2011-01-03
      • 2013-05-12
      • 1970-01-01
      • 2016-04-13
      • 2012-10-28
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2010-11-28
      相关资源
      最近更新 更多