使用Materialize CSS的行间距 [英] Spacing Between Rows with Materialize CSS
本文介绍了使用Materialize CSS的行间距的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
使用MaterializeCSS,如何调整/删除行之间的垂直间距?
Using MaterializeCSS, how can I adjust/remove the vertical spacing between rows?
示例代码:
<div class="row">
<div class="col s12" style="text-align: center;">
foobar
</div>
</div>
<div class="row">
<div class="col s12" style="text-align: center;">
12345
</div>
</div>
推荐答案
我知道了.将每个col
放在单个row
中将消除垂直间距.
I figured it out. Put each col
within a single row
will eliminate the vertical spacing.
<div class="row">
<div class="col s12" style="text-align: center;">
foobar
</div>
<div class="col s12" style="text-align: center;">
12345
</div>
</div>
这令人困惑,但是可以正常工作.从概念上讲,我认为行"就像一个表行,无论大小如何,都将其强制为一行,但这确实可行,因为每个col
具有s12
(全宽)大小.希望这个答案对其他人有帮助.
It is confusing but it works. Conceptually, I would think that a "row" is like a table row, forcing everything inside it to be on a single row regardless of size, but this does work since each col
has s12
(full width) size. Hope this answer helps someone else.
这篇关于使用Materialize CSS的行间距的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文