首页
学习
活动
专区
圈层
工具
发布
社区首页 >问答首页 >顺风响应设计不适用

顺风响应设计不适用
EN

Stack Overflow用户
提问于 2022-05-12 11:53:08
回答 1查看 569关注 0票数 1

我有这段代码,用于在桌面和上面并排显示两个表。但在移动显示器上,它们互相堆叠在一起。我设法使其中一种或另一种发挥作用。在sm:标记中被完全忽略,它只使用第一个。所以我不能让两者兼得。响应标记适用于代码中出现的所有其他时间,而不是这个场景。由于移动和桌面之间的任何原因,我不能在flex-col和flex-row之间进行更改。

编辑:看起来它现在在其他几个地方也不起作用,不仅仅是在这里,例如

代码语言:javascript
复制
<div class="container 2xl:max-w-screen-xl mx-auto pb-8">
    <h1 class="text-3xl font-bold text-gray-200">ID</h1>
    <p class="text-gray-400 italic">Time</p>

    <div class="flex flex-col sm:flex-row">
        <div class="flex flex-col sm:flex-row">
            <table id="Y_table" class="w-full mt-2 row-border table border border-gray-700 rounded">
                <thead class="bg-gray-800 text-gray-500 uppercase text-xs sm:flex-row">
                <tr>
                    <th class="p-4 whitespace-nowrap">X</th>
                    <th class="p-4 whitespace-nowrap">X</th>
                    <th class="p-4 whitespace-nowrap">X</th>
                    <th class="p-4 whitespace-nowrap">X</th>
                    <th class="p-4 whitespace-nowrap">X</th>
                    <th class="p-4 whitespace-nowrap">X</th>
                </tr>
                </thead>
            </table>
        </div>

        <div class="flex flex-col sm:flex-row">
            <table id="X_table" class="w-full mt-2 table row-border border border-gray-700 rounded">
                <thead class="bg-gray-800 text-gray-500 uppercase text-xs">
                <tr>
                    <th class="p-4 whitespace-nowrap">X</th>
                    <th class="p-4 whitespace-nowrap">X</th>
                    <th class="p-4 whitespace-nowrap">X</th>
                    <th class="p-4 whitespace-nowrap">X</th>
                    <th class="p-4 whitespace-nowrap">X</th>
                    <th class="p-4 whitespace-nowrap">X</th>
                    <th class="p-4 whitespace-nowrap">X</th>
                </tr>
                </thead>
            </table>
        </div>
    </div>
</div>
EN

回答 1

Stack Overflow用户

发布于 2022-05-12 12:11:30

你头上有视图标签吗?

代码语言:javascript
复制
<meta name="viewport" content="width=device-width, initial-scale=1.0">
票数 3
EN
页面原文内容由Stack Overflow提供。腾讯云小微IT领域专用引擎提供翻译支持
原文链接:

https://stackoverflow.com/questions/72215083

复制
相关文章

相似问题

领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档