【问题标题】:susy grid 840 how to set itsusy grid 840怎么设置
【发布时间】:2015-12-31 15:28:09
【问题描述】:

我想定位 2 个 div。 150像素 | div 宽度 440px | 100像素 | div 宽度 440px | 150 像素。我不知道如何设置它。我知道这应该很简单,但这是我的第一个 susy 项目

$susy: (
 columns: 12,
 math: fluid,
 output: float,
 last-flow: to
);

.rounded{
  @include span(6);
  border-radius: 2px;
  background-color: rgb(246, 246, 246);
  box-shadow: 0px 0px 5px 0px rgba(0, 0, 0, 0.25);
  position: relative;
//left: 150px;
  top: 224px;
  width: 440px;
  height: 478px;
  overflow-x:hidden;
  overflow-y: scroll;
}

.rounded2 {
  @include span(6);
  border-radius: 2px;
  background-color: rgb(246, 246, 246);
  box-shadow: 0px 0px 5px 0px rgba(0, 0, 0, 0.25);
  position: relative;
  top: 224px;
  width: 440px;
  height: 478px;
  overflow-x:hidden;
  overflow-y: scroll;
 }

<div class="newApp">
 <h1>To do list</h1>
 <div class="rounded">
  <ul>
    {{#each tasksToDo}}
        {{>task}}
    {{/each}}
 </ul>
</div>

<h1>Done list</h1>
 <div class="rounded2">
  <ul>
    {{#each taskDone}}
        {{>done}}
    {{/each}}
  </ul>
 </div>
</div>

<template name="done">
<li class="list_item">
    <span class="text">{{title}}</span>
</li>
</template>

<template name="task">
 <li class="list_item">
    <span id="editingTask">{{> editableText collection="tasks"     field="title"}}</span>
    <br>
    <button class="completed">Completed</button>
    <button class="edit">Edit</button>
    <button class="delete">Delete</button>
</li>

http://imgur.com/TRp9iJd

这里是html和图片

【问题讨论】:

  • 你能分享一张图片来了解你想要什么吗?还有 de html,如果可能的话,把它贴在 codepen.io 上并分享链接。
  • imgur.com/TRp9iJd 这是我想要的,我将 html 放在原帖中
  • 尝试将 position:relative 更改为 position:absolute 并使用 topleft 值,如果它不能解决您的问题,请分享 un example con codepen.io/pen

标签: css sass susy


【解决方案1】:

您当前的代码覆盖了 susy 将为您做的所有事情。 Susy 设置宽度、浮点数和边距或填充(用于装订线)。这是sassmeister demonstration一种方式,可以使用 Susy 获取布局。可能有许多其他方法,因为 Susy 本质上是一个计算器,并希望您提供大部分意见。

$susy: (
  columns: 2,
  column-width: 440px,
  gutters: 100/440,
  gutter-position: split,
);

.newApp {
  padding: gutter()*2;
}

.rounded,
.rounded2 {
  @include span(1);
}

不过,目前您的 h1 元素会妨碍您。您必须将它们包装在布局块中。这只是 CSS 浮动的问题。

【讨论】:

  • 还有一个问题,现在页脚很少有 div(内联徽标),现在页脚的大小为 590%
  • 如果没有看到代码,我无法对此发表评论。有没有可能您跨越的列数超过了可用的列数?
  • 我修好了.. 但我注意到间距不正确我需要 150x440x100x440x150 但你的是 150x440x150x440x150
  • 已更新以解决此问题。实际上,所有排水沟我都有100,所以只需要在边缘添加更多(参见gutter()*2)。
猜你喜欢
  • 1970-01-01
  • 1970-01-01
  • 1970-01-01
  • 1970-01-01
  • 1970-01-01
  • 2017-08-23
  • 2016-07-24
  • 1970-01-01
  • 1970-01-01
相关资源
最近更新 更多