简体   繁体   中英

How to make gallery full width?

I'm trying to make an image gallery full-width at whatever resolution.

Strangely, it's only when I click on the maximize button button on the browser window, the gallery goes full screen. So far I haven't been able to figure out the issue.

Here's the demo link ~

http://constantcontrast.com/demo/

Try this:

Find boxlayout.js , open it up and locate lines 54-57 . It should look something like:

if( !$section.data( 'open' ) ) {
    $section.data( 'open', true ).addClass( 'bl-expand bl-expand-top' );
    $el.addClass( 'bl-expand-item' );   
}

At the end of that, add:

setTimeout(
    function() {
        $( window ).trigger( 'resize' );
    },
    500
);

So it should look like:

if( !$section.data( 'open' ) ) {
    $section.data( 'open', true ).addClass( 'bl-expand bl-expand-top' );
    $el.addClass( 'bl-expand-item' );   
}
setTimeout(
    function() {
        $( window ).trigger( 'resize' );
    },
    500
);

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM