Twentyfourteen主题简单修改

博客目前在用的主题是WP自带的twentyfourteen主题。觉得还不错,拿来稍加修改就用了。

  • 适配宽屏

这套主题默认显示的最大宽度是1260px,就导致了在宽屏上浏览时网页右侧有一条很难看的白边。可以通过修改style.css实现:

.site-header {
	background-color: #000;
	max-width: 1260px;
	position: relative;
	width: 100%;
	z-index: 4;

其中max-width由1260px修改为max-width:100%;即可。

  • 修改默认配色

同样是style.css种修改背景色:

网站标题的背景色:
.site-header {
background-color: #000;

左侧边栏的背景色:
.site:before {
background-color: #000;

底边的背景色:
.site-footer {
background-color: #000;

或是插件解决:fourteen-colors

  • 修改每行正文显示宽度

每行正文显示的内容较少,同样通过修改style.css解决

 .page-content {
 margin: 0 auto;
 max-width: 474px;

474px修改为合适值,我选的630px。

《Twentyfourteen主题简单修改》上有4条评论

发表回复

您的电子邮箱地址不会被公开。 必填项已用 * 标注