Youtube видео в попап autoplay

Youtube видео в попап autoplay
Тут можно получить другие превьюшки изображений - https://boingboing.net/features/getthumbs.html

Рарзметка HTML:




Стили CSS:

.video_area_video_item .video_area_trigger {
    position: relative;
    z-index: 1;
    -webkit-background-size: cover;
    background-size: cover;
    display: inline-block;
    cursor: pointer;
    border: 2px solid #fff;
    -webkit-transition: all 0.15s ease;
    -moz-transition: all 0.15s ease;
    -ms-transition: all 0.15s ease;
    -o-transition: all 0.15s ease;
    transition: all 0.15s ease;
    padding: 0;
}
.video_area_video_item .video_area_trigger:hover:before {
    opacity: 1;
}
.video_area_trigger img {
    width: 100%;
}
.video_area_trigger:before {
    position: absolute;
    content: "";
    background-image: url('data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAIAAAABYCAYAAAA9U/+JAAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAAyJpVFh0WE1MOmNvbS5hZG9iZS54bXAAAAAAADw/eHBhY2tldCBiZWdpbj0i77u/IiBpZD0iVzVNME1wQ2VoaUh6cmVTek5UY3prYzlkIj8+IDx4OnhtcG1ldGEgeG1sbnM6eD0iYWRvYmU6bnM6bWV0YS8iIHg6eG1wdGs9IkFkb2JlIFhNUCBDb3JlIDUuMy1jMDExIDY2LjE0NTY2MSwgMjAxMi8wMi8wNi0xNDo1NjoyNyAgICAgICAgIj4gPHJkZjpSREYgeG1sbnM6cmRmPSJodHRwOi8vd3d3LnczLm9yZy8xOTk5LzAyLzIyLXJkZi1zeW50YXgtbnMjIj4gPHJkZjpEZXNjcmlwdGlvbiByZGY6YWJvdXQ9IiIgeG1sbnM6eG1wPSJodHRwOi8vbnMuYWRvYmUuY29tL3hhcC8xLjAvIiB4bWxuczp4bXBNTT0iaHR0cDovL25zLmFkb2JlLmNvbS94YXAvMS4wL21tLyIgeG1sbnM6c3RSZWY9Imh0dHA6Ly9ucy5hZG9iZS5jb20veGFwLzEuMC9zVHlwZS9SZXNvdXJjZVJlZiMiIHhtcD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y54Tf9gAAAAABJRU5ErkJggg==');
    background-repeat: no-repeat;
    background-position: 50%;
    -webkit-background-size: contain;
    background-size: contain;
    z-index: 2;
    height: 44px;
    width: 64px;
    left: 50%;
    top: 50%;
    margin-left: -32px;
    margin-top: -32px;
    opacity: 0.8;
}

Скрипты JS:

$(".video_area_trigger").click(function(){
    var t = $(this);
    var videolink = t.attr("data-videolink");
    $.fancybox('');

});

Результат:

Способ поблагодарить автора сайта:

Комментарии (0)

  1. Напишите первый комментарий
*Комментарий будет опубликован после проверки модератором