Hexo-next主题配置
修改背景样式
打开文档下themes\next\source\css\ _custom\custom.styl文件,这个是Next故意留给用户自己个性化定制一些样式的文件,添加以下代码:(先在...\themes\next\source\images路径下添加一个背景图片banner.jpg)
// Custom styles.body { background:url(/images/banner.jpg); background-repeat: no-repeat; background-attachment:fixed; background-position:50% 50%; background-size: 100% 100%;}打开站点配置文件:站点根目录/_config.yml
修改成中文显示和标题名字:(支持的文字类型可以在该主题下\themes\next\languages,language文件夹下查看,简体中文zh-Hans,其它主题可能是zh-CH)
# Site title: iBoundary subtitle: ‘‘ description: ‘‘ keywords: author: iBoundary language: zh-Hans timezone: ‘‘
全部代码:(themes\next\source\css\ _custom\custom.styl)
// Custom styles.//底部字体颜色
.footer-inner {color: #7FFFD4;}//全局背景图
body {
//background:url(/images/banner.jpg);
//background-repeat: no-repeat;
//background-attachment:fixed;
//background-position:50% 50%;
//background-size: 100% 100%;
}
//侧栏背景图和字体颜色
#sidebar {
background:url(/images/banner.jpg);
background-size: cover;
background-position:center;
background-repeat:no-repeat;
p,span,a {color: #1C1C1C;}
}//设置文章边框
.post {
margin-top: 60px;
margin-bottom: 60px;
padding: 25px;
-webkit-box-shadow: 0 0 5px rgba(202, 203, 203, .5);
-moz-box-shadow: 0 0 5px rgba(202, 203, 204, .5);
}修改完上面操作时需要刷新才能生效:
$ hexo clean && hexo g && hexo s$ hexo d #确认没问题再执行这个
相关推荐
Ladyseven 2020-10-22
luofuIT成长记录 2020-09-22
Mynamezhuang 2020-09-18
李鴻耀 2020-08-17
yaodilu 2020-08-03
zhoujiyu 2020-06-28
89510194 2020-06-27
CaiKanXP 2020-06-13
MaureenChen 2020-06-12
Phoebe的学习天地 2020-06-07
淡风wisdon大大 2020-06-06
buttonChan 2020-06-06
xtuhcy 2020-05-20
AlisaClass 2020-05-18
赵家小少爷 2020-05-16
nicepainkiller 2020-05-05