首页 > 其他 > 详细

Hexo-NexT 设置圆角

时间:2021-08-30 01:05:55      阅读:12      评论:0      收藏:0      [点我收藏+]
  1. 在 blog_root/source/_data/variables.styl 中增加下列代码:
// 圆角设置
$border-radius-inner     = 20px;
$border-radius           = 20px;
  1. 然后在 NexT 的配置文件 _config.yml 中取消 variables.styl 的注释:
variable: source/_data/variables.styl
  1. 问题描述
    侧边栏的圆角明显有一层阴影,圆角效果不明显
    技术分享图片
  2. 问题解决
    github issues 上也有人提过类似的问题侧边栏顶栏无法显示为圆角,并且给出了回答。
    技术分享图片
    回答中有提到黑色背景覆盖了圆角,所以我尝试了下将黑色改为透明,成功实现。具体是修改 /themes/next/source/css/_variables/Gemini.styl 内代码,将 $body-bg-color 赋值为透明 transparent。
// Variables of Gemini scheme
// ==================================================

@import "Pisces.styl";

// Settings for some of the most global styles.
// --------------------------------------------------
$body-bg-color           = #eee;
// $body-bg-color           = transparent;
// Borders.
// --------------------------------------------------
$box-shadow-inner        = 0 2px 2px 0 rgba(0, 0, 0, .12), 0 3px 1px -2px rgba(0, 0, 0, .06), 0 1px 5px 0 rgba(0, 0, 0, .12);
$box-shadow              = 0 2px 2px 0 rgba(0, 0, 0, .12), 0 3px 1px -2px rgba(0, 0, 0, .06), 0 1px 5px 0 rgba(0, 0, 0, .12), 0 -1px .5px 0 rgba(0, 0, 0, .09);

// $border-radius-inner     = 20px;
// $border-radius           = 20px;

$border-radius-inner     = initial;
$border-radius           = initial;
// $border-radius-inner     = 0 0 3px 3px;
// $border-radius           = 3px;

Hexo-NexT 设置圆角

原文:https://www.cnblogs.com/cscshi/p/15196119.html

(0)
(0)
   
举报
评论 一句话评论(0
关于我们 - 联系我们 - 留言反馈 - 联系我们:wmxa8@hotmail.com
© 2014 bubuko.com 版权所有
打开技术之扣,分享程序人生!