个人知识库
Author: 刘杰文, Date: Unknown, Categories: , Tags:
有时屏幕尺寸不够,左侧右侧的东西都不会显示。也就看不到导航了。
我去翻了翻主题的项目文件_sass/jekyll-theme-leap-day.scss, 以脚注footer距离,定位到第358行:
footer {
width:180px;
position: fixed;
left:50%;
margin-left:-530px;
bottom:20px;
text-align: right;
line-height: 16px;
}
我想,这是因为margin-left这个属性。它被设置为负值,所以左侧剩余空间达不到这个数值的时候就不会显示。是因为display属性被设置为none了。
再往下做了分辨率的适配,这里发现设置都很简单,比如footer的text-align属性被从right改成了center。