gpt4 book ai didi

compass-sass - 苏西 : positioning of element in root context

转载 作者:行者123 更新时间:2023-12-04 06:23:58 24 4
gpt4 key购买 nike

这是我第一次使用 Susy。我真的很喜欢我在文档/教程中看到的内容,但是我在第一次尝试布局时遇到了一些意想不到的结果。

版本信息:

>gem install compass-susy-plugin
Successfully installed sass-3.1.2
Successfully installed chunky_png-1.2.0
Successfully installed fssm-0.2.7
Successfully installed compass-0.11.1
Successfully installed compass-susy-plugin-0.9

>ruby --version
ruby 1.9.2p136 (2010-12-25 revision 30365) [x86_64-darwin10.5.0]

下图显示了我使用 tutorial 得到的结果html 和 screen.scss 逐字记录:

why_is_the_h1_off_the_grid_somewhat

如您所见,检查 h1 元素显示它刚好位于网格之外。这是正常的吗?

最佳答案

查看我对 another similar question 的评论:

Susy isn't just another grid system like all the others. It was designed to fulfill a very specific purpose: grids that are fluid on the inside. The units you use to create the grid are applied to the container, not to each column. Everything inside is built with percentages. What you are seeing is normal. It's true of all fluid grids, because of sub-pixel rounding. It's not a bug, it's a part of building responsive web sites.

If you need pixel-exact grids, Susy is the wrong tool for you. It all depends what you are trying to build.

Re-size your browser to see how it works. You'll notice the grids snapping-to and floating within a few pixels of their guides, but the grid stays intact and never triggers the horizontal scroll-bar.



干杯!

-e

关于compass-sass - 苏西 : positioning of element in root context,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/6241960/

24 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com