Simple Video Lightbox
How do I make an simple video lightbox?
A Simple method for creating a Lightbox like effect on a Vimeo Video.. What is a simple video lightbox? How do you make a simple video lightbox? This script and codes were developed by Saysora on 26 August 2022, Friday.
Simple Video Lightbox - Script Codes HTML Codes
<!DOCTYPE html>
<html >
<head> <meta charset="UTF-8"> <title>Simple Video Lightbox</title> <link rel="stylesheet" href="css/style.css">
</head>
<body> <div id="wrap"> <div class="tryit"> <div class="title"> <h1>Simple Video Lightbox</h1> </div> <div class="list"> <div class="item"> <img src="http://placehold.it/800x310"> <iframe src="" width="800" height="281" frameborder="0" webkitallowfullscreen mozallowfullscreen allowfullscreen class="hide" id="mtn"></iframe> <div class="close">X</div> </div> </div> </div>
</div> <script src='http://cdnjs.cloudflare.com/ajax/libs/jquery/2.1.3/jquery.min.js'></script> <script src="js/index.js"></script>
</body>
</html>
Simple Video Lightbox - Script Codes CSS Codes
* { margin: 0; padding: 0;
}
body { background: #34495e; font-family: "Helvetica";
}
#wrap { width: 960px; min-height: 400px; margin: 40px auto; background: #27ae60; border: 5px solid #27ae60; padding: 10px 0;
}
#wrap:hover { background: #ecf0f1;
}
#wrap:hover h1 { color: #27ae60;
}
.title { width: 100%; padding: 10px; margin: auto; text-align: center;
}
h1 { font-size: 2ems; color: #ecf0f1;
}
.list { padding: 10px 10px 50px;
}
.list .item { padding: 5px; width: 800px; height: 310px; margin: 0 auto; z-index: 160; background: #27ae60;
}
#wrap { -webkit-transition: all 0.2s linear; -moz-transition: all 0.2s linear; -o-transition: all 0.2s linear; transition: all 0.2s linear;
}
.thefocus { margin: auto; position: absolute; top: 30%; left: 0; bottom: 0; right: 0; width: 800px; height: 300px; z-index: 1000;
}
.blackestnight { background: rgba(0, 0, 0, 0.9); min-height: 100%; height: 100%; width: 100%; position: absolute; z-index: 40; top: 0; left: 0;
}
.close { position: absolute; bottom: 5px; right: 8px; font-size: 5ems; font-weight: bolder; display: none; color: #000; cursor: pointer;
}
.close:hover { color: #e74c3c;
}
.show { display: block;
}
.hide { display: none;
}
Simple Video Lightbox - Script Codes JS Codes
$(document).ready(function(){ $('.item').click(function(){ $(this).addClass('thefocus'); $(this).children('.close').css('display', 'block'); $('body').after('<div class="blackestnight"></div>'); $(this).children('img').hide(); $(this).children('iframe').show(); $('#mtn').attr('src','//player.vimeo.com/video/22439234'); }); $('.close').click(function(e){ $('.blackestnight').hide(); $('.item').removeClass('thefocus'); $(this).css('display', 'none'); $('.item').children('img').show(); $('.item').children('iframe').hide(); $('#mtn').attr('src', ''); e.stopPropagation(); });
});
Developer | Saysora |
Username | azureknight |
Uploaded | August 26, 2022 |
Rating | 3.5 |
Size | 3,103 Kb |
Views | 32,384 |
Find the perfect freelance services for your business! Fiverr's mission is to change how the world works together. Fiverr connects businesses with freelancers offering digital services in 500+ categories. Find Developer!
Name | Size |
Flat UI Login | 3,358 Kb |
Info Cards | 3,926 Kb |
CSS Tab Holder | 3,445 Kb |
Simple Video Lightbox | 3,103 Kb |
Beautiful Ribbon | 1,985 Kb |
Clean Card Layout | 3,654 Kb |
Flat Ui Rollover Buttons | 3,312 Kb |
Grow Circle Animation | 2,075 Kb |
Ralph Lauren Mimic | 3,067 Kb |
Legend of Zelda - Triforce | 2,530 Kb |
Jasper is the AI Content Generator that helps you and your team break through creative blocks to create amazing, original content 10X faster. Discover all the ways the Jasper AI Content Platform can help streamline your creative workflows. Start For Free!
Name | Username | Size |
Rainbow Drops | Csbarnes | 2,365 Kb |
Prism | Pyrografix | 2,843 Kb |
FCC Portfolio | Cmwebby | 4,304 Kb |
Alter bg opacity on hover... | Chrisboon27 | 2,054 Kb |
Css3 loader | Clknap | 2,391 Kb |
Funny menu | AxeLVaisper | 4,671 Kb |
Incremental game | Eprouver | 5,868 Kb |
Minimal Menu | Achudars | 3,430 Kb |
Animate elements with fixed gradient | Badabam | 4,406 Kb |
Roman Numerical Converter | Vhall_io | 2,102 Kb |
Surf anonymously, prevent hackers from acquiring your IP address, send anonymous email, and encrypt your Internet connection. High speed, ultra secure, and easy to use. Instant setup. Hide Your IP Now!