1)slimbox2.jsを開く
2)これを書き直します:
w(h).css({ backgroundImage: "url(" + o + ")", visibility: "hidden", display: "" });
w(q).width(l.width);
w([q, I, d]).height(l.height);
に:
if (l.width > $(document).width() - 100) {
l.height = l.height * ($(document).width() - 100) / l.width;
l.width = $(document).width() - 100;
}
w(h).css({ backgroundImage: "url(" + o + ")", backgroundSize: "" + l.width + "px " + l.height + "px", visibility: "hidden", display: "" });
w(q).width(l.width);
w([q, I, d]).height(l.height);
最大幅は
$(document).width() - 100