在响应式实用程序中使用表有什么问题? [英] What is wrong with using tables in responsive utilities?
问题描述
Bootstrap 的 关于响应式设计的页面 是这样说的:
Bootstrap's page about responsive design says this:
响应式实用程序不应与表格一起使用,因此不支持.
Responsive utilities should not be used with tables, and as such are not supported.
作为 Web 开发的新手,我不熟悉这是在说什么.似乎人们普遍反对使用 Being new to web development, I am not familiar with what this is talking about. It seems that there is a general aversion to using 另外,这句话的措辞对我来说没有意义.不应该这样读吗? Also, the quote as phrased doesn't make sense to me. Shouldn't it read like this? 不应在响应式实用程序中使用表格,因此不支持. Tables should not be used in responsive utilities, and as such are
not supported. 表格是非常结构化的元素. Tables are very structured elements. A HTML,在响应式设计中,不应该定义 CSS 的工作应该是什么样子(或者它应该在某个程度上出现在哪里).HTML 应该简单地将文本和其他元素分组.因此,HTML HTML, in responsive design, shouldn't define what something should look like (or where it should appear to a degree) that's CSSs job. the HTML should simply group text and other elements. So a HTML CSS CSS 希望这会有所帮助. 这篇关于在响应式实用程序中使用表有什么问题?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!.这是真的吗?
<table>
. Is this true?
推荐答案
只能是一列.您无法将其更改为突然显示为一行或将其浮动在某处等等.
<td>
can only ever be a column. You couldn't change it to suddenly appear like a row or float it somewhere, etc., etc. 及其所有相关标签打破了这种范式.
<table>
and all it's associated tags breaks this paradigm.display
现在包含类似表格的元素:CSS display: table-column" 应该如何工作? 所以这消除了嵌入 标签的需要,并允许您使用更通用的
<div>
标签等,因此现在它是一个 <div>
,看起来像一个 >,有没有什么可以阻止您通过更新 CSS 使其看起来完全不同.你甚至可以让它在不同的观众面前看起来不同,等等.
display
now contains table like elements: How is a CSS "display: table-column" supposed to work? so this removes the need to embed <table>
tags and allows you to use the more generic <div>
tags and their like, thus now it's a <div>
that looks like a <table
>, there is nothing to stop you making this appear as something completely different simply by updating the CSS. You could even make it look different for different audiences, etc.
登录
关闭