Can you make fancyBox ignore title text when sizing media within an overlay?

亡梦爱人 提交于 2019-12-06 14:57:10

If you are OK with having to scroll to read all the title text, then you can combine the fitToView and maxWidth options to have the size of your media the way you want it without ignoring the title like :

$(".fancybox").fancybox({
    fitToView: false, // avoids media to shrink to fit in the viewport
    margin: [20, 60, 20, 60],
    maxWidth: "90%", // avoids bigger media to stretch outside the viewport boundaries 
    helpers: {
        title: {
            type: "inside"
        }
    }
});

See JSFIDDLE

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!