简体   繁体   English

SkelJS-不同行偏移量,每个特定断点一个

[英]SkelJS - Differents rows offsets, one for each specific breakpoints

I'm starting to use Skel for building responsive webdesigns. 我开始使用Skel构建响应式网页设计。

I want to set alternative units width for my differents breakpoints (layouts) 我想为我的差异断点(布局)设置替代单位宽度

Look at this code: 看下面的代码:

<div class="-1u 10u -1u">
     <p> Some text ipsum</p>
</div>

So here, we have a offset of 1u on each side of the row. 因此,在此行的每一侧都有一个1u的偏移量。 What i want to do, is to set specific offsets for each breakpoints i'm using (wide, medium, small, xxsmal). 我想做的是为我使用的每个断点设置特定的偏移量(宽,中,小,xxsmal)。

When i dont need offsets, i do like this: 当我不需要补偿时,我会这样:

<div class="2u 6u(medium) 12u(small)">
     <p> Some text ipsum</p>
</div>

But with offsets it just dont work the way i'm expecting, any help would be very usefull for me. 但是有了偏移量,它却无法按我期望的方式工作,任何帮助对我来说都是非常有用的。

I maybe didnt totally understood how SkelJS is working, so excuse me if the answer is in the doc. 我可能不完全了解SkelJS的工作方式,所以请回答文档中的内容。 Thanks in advance for your answers. 预先感谢您的回答。

Imagine you want in wide mode: 3 offsets + 6 units + new line 想象一下您要在宽屏模式下:3个偏移量+ 6个单位+新行

Then in medium: 2 offsets + 8 units + new line 然后以中等:2个偏移量+ 8个单位+新行

And in small: 12 units: 小:12个单位:

You will write: 您将编写:

<div class="-3u(wide) 6u$(wide) -2u(medium) 8u$(medium) 12u(small)">
</div>

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM