这是看了里边 js,实现如下:
function() {
"use strict";
function t() {
var t = $(".blog-content");
$(".scroll-indicator-container").remove();
var n = function() {
var n = e.scrollTop() - t.offset().top
, i = n / (t.height() - e.height()) * 100;
$(".scroll-indicator-container .__bar").css({
width: i + "%"
})
};
if ($(".blog-show").length && $(".post--full").length) {
var i = $("header nav")
, r = $('<div class="scroll-indicator-container"><div class="__bar"></div></div>');
i.append(r),
n(),
e.on("scroll", n)
} else
e.off("scroll", n)
}
{
var e = $(window);
$(document)
}
$(t)
}();