响应列的问题
希望有人可以帮助我。
如果在笔记本电脑屏幕上,在平板电脑的2列中,我试图将文本分为3列,而1列则用于手机。
我正在使用下面的代码,它在3列中运行良好,但是响应次数不起作用,如何解决该列的任何想法?
.abion在容器
TK中发现了很多!!!
.container {
display: flex;
align-items: center;
}
.about {
columns: 3;
column-fill: balance-all;
column-gap: 1.5em;
padding: 2em 4em;
font: 1em/1.2 "special elite", serif;
hyphens: auto;
text-align: center;
color: black;
}
@media only screen and (max-width: 810px) {
.about {
columns: 2;
}
}
Hope someone can help me out.
I am trying to have a text divided in 3 columns if on a laptop screen, in 2 columns for a tablet and 1 column for a phone.
I am using the code below and it works well for the 3 columns but the responsive bit is not working, any ideas on how to fix it?
The .about is found inside the container
Tks a lot!!!
.container {
display: flex;
align-items: center;
}
.about {
columns: 3;
column-fill: balance-all;
column-gap: 1.5em;
padding: 2em 4em;
font: 1em/1.2 "special elite", serif;
hyphens: auto;
text-align: center;
color: black;
}
@media only screen and (max-width: 810px) {
.about {
columns: 2;
}
}
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
我为移动设备添加了媒体查询,并为平板电脑添加了更新的媒体查询。
I have added a media query for mobile and an updated media query for tablet.
您共享的CSS完全很好,但我更喜欢您尝试使用列计数而不是列。
谢谢
CSS you shared is completely fine but I prefer you to try to use column-count instead of columns.
Thank you