0

我想知道是否有办法在fancybox 中打开嵌入的Youtube 视频并占用一定百分比的宽度,比如100% 或尽可能大,同时保留其中包含的视频的纵横比。

我有:

$('.fancybox').fancybox({
        helpers: {
            media: {},
            overlay : {
                css : {
                    'background' : 'rgba(230, 230, 215, 0.95)'
                }
            }
        },
        padding: 0,
        margin: 30,
        width: '90%',
        aspectRatio : true,
        autoSize: false,
        arrows: false,
        closeBtn: false
    });
4

1 回答 1

0

It looks like it is possible with some CSS and/or jQuery. You'll be working with your embed code, not with your Fancybox code. Check out this article: http://css-tricks.com/NetMag/FluidWidthVideo/Article-FluidWidthVideo.php

于 2013-10-11T16:07:27.093 回答