简体   繁体   English

如何在 html 中使用 jQuery css 将显示图像的视频放在图像前面?

[英]How i can put the video showing image in front of image using jQuery css in html?

as example i need to put the image in center of image as http://www.press75.com/themes/video-elements-theme-demo/例如,我需要将图像放在图像中心,如http://www.press75.com/themes/video-elements-theme-demo/

on the web-page code check that page exist with video or not if yes then they wrap the image with anchor tag在网页代码上检查页面是否存在视频,如果是,那么他们用锚标签包装图像

<img src="myimage" alt=""/>

if image found that it's goes like如果图像发现它是这样的

<a href="embedelink" id="videofound">    <img src="myimage" alt=""/></a>

now if link open that open a fancybox who show the video in it.现在如果打开链接,打开一个显示视频的花式框。 now i have a problem that someone can show me the css that it's show the play image in middle of image as demo shows.现在我有一个问题,有人可以给我看 css,它在图像中间显示播放图像,如演示所示。

how i can put the css than their is no problem come.我怎么能把 css 比他们的没问题来。 well in m case the image is bigger then height="367" width="550"好吧,在 m 的情况下,图像大于height="367" width="550"

can somone show me the css for that.有人可以给我看 css 吗?

thanks谢谢

If using Jquery Have a look at http://fancybox.net/如果使用 Jquery 看看http://fancybox.net/

code extract from http://fancybox.net/howto代码摘自http://fancybox.net/howto

$(document).ready(function() {

    /* This is basic - uses default settings */

    $("a#single_image").fancybox();

    /* Using custom settings */

    $("a#inline").fancybox({
        'hideOnContentClick': true
    });

    /* Apply fancybox to multiple items */

    $("a.group").fancybox({
        'transitionIn'  :   'elastic',
        'transitionOut' :   'elastic',
        'speedIn'       :   600, 
        'speedOut'      :   200, 
        'overlayShow'   :   false
    });

});

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

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