简体   繁体   English

更改博客中帖子的字体大小

[英]change font size of posts in blogger

I'm trying to change the font size in my posts on blogger http://www.aspensummit.co and I'm not having any luck finding the body/post font size in the html section to change it. 我正在尝试更改我在博客http://www.aspensummit.co上的帖子中的字体大小,但我没有运气在html部分中找到要更改的body / post字体大小。 I was able to change my header menu links and sidebar title sizes with no problem, but the actual blog posts are giving me trouble. 我可以毫无问题地更改标题菜单链接和侧栏标题的大小,但是实际的博客帖子给我带来了麻烦。 Is there a css override I can put in the customized template settings to fix this? 我可以在自定义模板设置中使用CSS替代来解决此问题吗?

The body post is inheriting font styles from this css rule in your file summer-to-do-list.html . 主体文章将从您的文件summer-to-do-list.html此CSS规则继承字体样式。

.post-body, .post-footer, .home-link, .older-link, .newer-link {
    font:400 11.5px'Raleway', sans-serif;
    line-height:1.6;
}

If you can change this rule, then setting any font-size by replacing 11.5px from font:400 11.5px'Raleway', sans-serif; 如果您可以更改此规则,则可以通过从font:400 11.5px'Raleway', sans-serif;替换11.5px来设置font-size font:400 11.5px'Raleway', sans-serif; will change the font-size. 将更改字体大小。

But, if you cannot change that rule, then adding a more specific rule will override this style, such as: 但是,如果您无法更改该规则,则添加更具体的规则将覆盖此样式,例如:

body .post-body, .post-footer, .home-link, .older-link, .newer-link {
    font:400 14px'Raleway', sans-serif;
}

You can also try !important but that's not advisable: 您也可以尝试!important但不建议这样做:

.post-body{
    font:400 14px'Raleway', sans-serif !important;
    line-height:1.6;
}

Or maybe a more specific css selector containing ID such as: 或者,也许是一个更特定的包含ID CSS选择器,例如:

div[id^='post-body-']{
    font-size:16px;//Or any value.
}

Here [id^='post-body-'] is a css selector for all the elements having id starting with post-body- . 这里[id^='post-body-']是所有具有id以post-body-开头的元素的css选择器。

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

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