用JS & CSS3制作电影首映倒计时效果设计cid1102-网页前端设计
Warning: Undefined property: stdClass::$maxbutton id="5" in /www/wwwroot/code.5g-o.com/wp-content/plugins/kama-clic-counter/class.KCCounter.php on line 733
<!DOCTYPE html> <html lang="en"> <head> <meta charset="utf-8"> <title>Countdown</title> <link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/twitter-bootstrap/4.0.0/css/bootstrap.min.css"> <link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/4.7.0/css/font-awesome.min.css" /> <link href="https://fonts.googleapis.com/css?family=Oswald:200,300,400,500,600,700" rel="stylesheet"> <link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/lity/2.3.1/lity.css"> <script src="https://code.jquery.com/jquery-3.4.1.js"></script> <script src="https://cdnjs.cloudflare.com/ajax/libs/lity/2.3.1/lity.min.js"></script> <style> .main { background-image: url("images/call_of_duty_ww2_3-wallpaper-1366x768.jpg"); background-size: cover; background-position: center; font-family: 'Oswald', sans-serif; font-size: 18px; height: 100vh; } .main h2 { font-size: 32px; margin-bottom: 30px; text-transform: uppercase; } .content-middle { position: absolute; display: inline-block; width: 100%; left: 0; transform: translate(0, -50%); padding: 0 60px; top: 80%; } .content .banner { margin-top: -30px; width: 72%; float: right; box-shadow: 5px 0 30px 0 rgba(0, 0, 0, 9) } .video-image { position: relative; } .video-image:before { background: rgba(37, 41, 51, 0.4); content: ""; height: 100%; left: 0; position: absolute; top: 0; width: 100%; z-index: 0; } .video-image a i { color: #ffffff; text-align: center; line-height: 60px; width: 60px; height: 60px; background: #c9b281; display: inline-block; margin: 0 auto; border-radius: 50%; left: 0; position: absolute; right: 0; top: 50%; transform: translateY(-50%); z-index: 99; font-size: 20px; transition: all 0.5s ease-out 0s; } .video-image a i:hover { background: #323232; } .countdown { display: inline-block; text-align: center; margin: 0px 20px; } .countdown span { font-size: 40px; line-height: 40px; } .countdown p { font-size: 16px; text-transform: capitalize; margin-bottom: 0; } .countdown.small { display: inline-block; text-align: center; margin: 0px 10px; } .countdown.small span { font-size: 30px; line-height: 30px; } .countdown.medium { display: inline-block; text-align: center; margin: 0px 30px; } .countdown.medium span { font-size: 50px; line-height: 50px; } .countdown.medium p { font-size: 20px; text-transform: capitalize; } .countdown.large { display: inline-block; text-align: center; margin: 0px 20px; } .countdown.large span { font-size: 70px; line-height: 70px; } .countdown.large p { font-size: 24px; text-transform: capitalize; } .countdown.gray-bg { padding: 10px; } .countdown.countdown-border { padding: 10px; border: 2px solid #eeeeee; } .countdown.round { padding: 30px; border: 7px solid #eeeeee; border-radius: 50%; width: 140px; height: 140px; } .countdown.round.small { width: 100px; height: 100px; padding: 15px 10px; } .countdown.round.medium { width: 150px; height: 150px; padding: 15px; } .countdown.round.medium span { line-height: 68px; } .countdown.round.large { width: 190px; height: 190px; padding: 20px; } .countdown.round.large span { line-height: 92px; } .countdown.text-white p { color: #ffffff; } .countdown.round.text-white { border-color: rgba(255, 255, 255, 0.3); } </style> </head> <body> <section class="main"> <div class="content-middle"> <div class="container-fluid"> <div class="row"> <div class="col-lg-12 col-md-12"> <div class="content"> <div class="row"> <div class="col-lg-6 text-left "> <h2 class="text-white"> World’s Premiere Countdown</h2> <div class="countdown round small text-center"> <span class="days text-white">00</span><p class="text-white">days</p> </div> <div class="countdown round small text-center"> <span class="hours text-white">00</span><p class="text-white">hours</p> </div> <div class="countdown round small text-center"> <span class="minutes text-white">00</span><p class="text-white">minutes</p> </div> <div class="countdown round small text-center"> <span class="seconds text-white">00</span><p class="text-white">seconds</p> </div> </div> <div class="col-lg-6 "> <img class="img-fluid float-left float-lg-right" src="images/banner-logo.png" alt=""> <div class="banner clearfix"> <div class="video-image"> <img class="img-fluid full-width" src="images/poster.jpg" alt=""> <a target="_blank" href="https://www.youtube.com/watch?v=zIj1gRhGXJo" data-lity > <i class="fa fa-play" ></i> </a> </div> </div> </div> </div> </div> </div> </div> </div> </div> </section> <script type="text/javascript" src="https://code.5g-o.com/wp-content/uploads/2020/04/google-jquery-2.js"></script> <script src="https://cdnjs.cloudflare.com/ajax/libs/jquery.downCount/1.0.0/jquery.downCount.min.js"></script> <script> function e() { var e = new Date; e.setDate(e.getDate() + 60); var dd = e.getDate(); var mm = e.getMonth() + 1; var y = e.getFullYear(); var futureFormattedDate = mm + "/" + dd + "/" + y + ' 12:00:00'; return futureFormattedDate; } $('.countdown').downCount({ date: e(), offset: -4 }, function () { alert('WOOT WOOT, done!'); }); </script> </body> </html>
一键获取本网站前端代码设计的所有源码
获取资源构建和完善自己的源码库
源码可以在本地直接演示
同时研究和体验 如何将一些具体的想法的实现过程
源码可以直接嫁接到自己的网站里复用
稍作修改成为自己的作品