CSS 网格框架中的排水沟有什么意义?

2023-07-31前端开发问题
5

本文介绍了CSS 网格框架中的排水沟有什么意义?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着跟版网的小编来一起学习吧!

问题描述

我正在研究 Web 开发,我正在使用包含网格系统的 Blueprint CSS 框架,我有几个问题.

I'm diving into web development and I'm playing with the Blueprint CSS framework, which includes a grid system, and I have a few questions.

  1. 排水沟有什么意义?当然,它们不习惯在列之间包含空格,因为您可以为此使用 margin CSS 属性,对吗?或者排水沟只是管理利润的一种优雅方式?
  2. 我不希望列之间有任何空间,并希望生成一个不包含装订线的网格布局,但所有生成器工具都阻止我使用零宽度装订线.这是为什么呢?
  3. 似乎不再支持建议的蓝图 CSS 生成器.谁能推荐一个蓝图 CSS 生成器来修改网格以包含零宽度排水沟?
  1. What's the point of gutters? Surely they're not used to include space between the columns because you can just use the margin CSS property for that, right? Or are gutters just an elegant way to manage margins?
  2. I don't want any space between my columns and would like to generate a grid layout that doesn't include gutters, but all the generator tools prevent me from having zero-width gutters. Why is that?
  3. It appears the suggested Blueprint CSS generator is no longer supported. Can anyone suggest a Blueprint CSS generator for modifying the grid to include zero-width gutters?

非常感谢您的智慧!

推荐答案

CSS Grid 系统背后的动机是完全自动化布局.排水沟通常是可取的,因为列之间的空白可以提高可读性,因此将它们作为自动化的一部分包含在内是有意义的.

The motivation behind a CSS Grid system is to completely automate layout. Gutters are usually desirable because white space between columns makes for better legibility so it makes sense to include them as part of the automation.

生成器存在的理由是让您摆脱实现它们所需的稍微繁琐的计算,但没有排水沟,数学和 css 一点也不复杂.

A Generator's raison d'être is to relieve you of the slightly tedious calculations necessary to implement them but without the gutters both the math and the css isn't at all complicated.

在没有发电机的情况下制作无排水沟网格应该非常简单.例如

It should be very straight forward to do a no-gutter grid without a generator. e.g.

( column width X n of columns ) + left margin + right margin = content width

.span-1 {width:100px}
.span-2 {width:200px}
.span-3 {width:300px}
.span-4 {width:400px}

etc...

这篇关于CSS 网格框架中的排水沟有什么意义?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持跟版网!

The End

相关推荐

layui 单选框、复选框、下拉菜单不显示问题如何解决?
1. 如果是ajax嵌套了 页面, 请确保 只有最外层的页面引入了layui.css 和 layui.js ,内层页面 切记不要再次引入 2. 具体代码如下 layui.use(['form', 'upload'], function(){ var form = layui.form; form.render(); // 加入这一句});...
2024-11-09 前端开发问题
313

layui要如何改变时间日历布局大小?
问题描述 我想改变layui时间日历布局大小,这个要怎么操作呢? 解决办法 可以用css样式对时间日历进行重新布局,具体代码如下: !DOCTYPE htmlhtmlheadmeta charset="UTF-8"title/titlelink rel="stylesheet" href="../../layui/css/layui.css" /style#test-...
2024-10-24 前端开发问题
271

CoffeeScript 总是以匿名函数返回
CoffeeScript always returns in anonymous function(CoffeeScript 总是以匿名函数返回)...
2024-04-20 前端开发问题
13

getFullYear 在一年的第一天返回前一年
getFullYear returns year before on first day of year(getFullYear 在一年的第一天返回前一年)...
2024-04-20 前端开发问题
6

如何制作 TextGeometry 多线?如何将它放在一个正方形内,以便它像 html 文本一样包裹在 div 内?
How do I make a TextGeometry multiline? How do I put it inside a square so it wraps like html text does inside a div?(如何制作 TextGeometry 多线?如何将它放在一个正方形内,以便它像 html 文本一样包裹在 div 内?) - IT屋-程序员软件开发技术分享社...
2024-04-20 前端开发问题
6

如何在开发网站时使用coffeescript?
How to use coffeescript in developing web-sites?(如何在开发网站时使用coffeescript?)...
2024-04-20 前端开发问题
10