增加动态演示图

This commit is contained in:
click33
2022-05-09 17:35:29 +08:00
parent af2d851ddb
commit 0975070508
12 changed files with 70 additions and 5 deletions

View File

@@ -81,6 +81,20 @@ var myDocsifyPlugin = function(hook, vm) {
// $('.search input').val('');
$('.results-panel').removeClass('show');
});
// 点击按钮,加载图片
$(document).on('click', '.show-img', function(){
var src = $(this).attr('img-src');
var img = '<img class="show-to-img" src="' + src + '" />';
$(this).after(img);
$(this).remove();
})
// 点击按钮,加载图片
$(document).on('click', '.show-to-img', function(){
open(this.src);
})
});
}

View File

@@ -204,7 +204,20 @@ body {
#main .toc-box a{border-color: rgba(0,0,0,0); transition: 0s;}
#main .toc-box a span{color: inherit;}
/* 加载图片的按钮 */
.show-img{
background-color: #FFF;
padding: 8px 15px;
border: 1px #42b983 solid;
color: #42b983;
cursor: pointer;
border-radius: 2px;
transition: all 0.2s;
}
.show-img:hover{
background-color: #eaf6eb;
}
.show-to-img{cursor: pointer;}
/* 导航栏悬浮时出现下滑条条 */
/* .doc-header .nav-right .wzi::after {