基础 zurb 更改字体大小和全宽 [英] foundation zurb change font-size and full width

查看:30
本文介绍了基础 zurb 更改字体大小和全宽的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我在 SASS 中使用 Foundation 4.但我真的找不到如何更改默认字体大小.对于我的语言,默认字体大小太大.

I use foundation 4 with SASS. but I can't really find how to change default font-size. For my language, default font-size is too big.

我试图改变某些部分.您可能知道,它也与全角相关.首先,我改变了全宽尺寸:$row-width: em-calc(1200)1000 到 1200.我需要更宽的.更改全角的方法正确吗?

I have tried to change some part. as you may know, it's related full-width as well. 1st of all I have changed full width size : $row-width: em-calc(1200) 1000 to 1200. I need wider. is it correct way to change full-width?

我尝试更改字体大小.

$base-font-size: 100% !default;
$em-base: 16px !default;

当我改变这些时.它与全宽有关.那么如何更改字体大小和全角?如果你有sass,请告诉我我需要修改哪个文件.

When I change these. it's related full width. Then How Can I change font-size and full-width? if you have sass, please let me know which file I need modified.

推荐答案

不是 100% 清楚您在问题中要求什么,但我希望我说对了 - 您想知道如何在不更改字体的情况下更改字体网格大小对吗?

Not 100% clear what you are asking for in your question, but I hope I got it right - you want to know how to change the font without changing the grid size right?

那么答案可以在文档中找到:

Then the answer can be found in the documentation:

/* Since the typical default browser font-size is 16px, that makes the calculation for grid size. */
/* If you want your base font-size to be a different size and not have it effect grid size too, */
/* set the value of $em-base to $base-font-size ($em-base: $base-font-size;) */
$em-base: 16px !default;

所以基本上只需设置:

@import "foundation/variables";
$base-font-size: 4px;
$em-base: $base-font-size;

将 em-base 改回默认值,您会看到网格也相应地更改为 $base-font-size.通过设置行宽,您也是在做正确的事情.

Change the em-base back to the default and you'll see that the grid also changes accordingly to $base-font-size. You are also doing the right thing by setting the row-width.

如果您在使 SASS 函数 em-calc() 工作时遇到问题,请确保在 @import "foundation/variables"; 之后调用它; 我不知道为什么 em-calc() 用于文档中,可能是 git<上的源代码/a> 已过时 - 但我不得不使用 emCalc(#px) - 即: emCalc(2000px);

If you'r having trouble getting the SASS function em-calc() to work, make sure you call it after @import "foundation/variables"; I don't know why em-calc() is used in the documentation, maybe the sourcecode on git is outdated - but I had to use emCalc(#px) - ie: emCalc(2000px);

这篇关于基础 zurb 更改字体大小和全宽的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆