html and css 将视频投射到整个网页作为动态背景cid1097-网页前端设计
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"> <meta name="viewport" content="width=device-width, initial-scale=1.0"> <title></title> <link rel="stylesheet" href="style.css"> </head> <body> <div class="full-screen"> <video src="video.mp4" autoplay muted loop></video> <div class="content"> <img src="valorant.png" alt=""> <a href="https://code.5g-o.com/">Play Now</a> </div> </div> </body> </html>
*{ margin: 0; padding: 0; font-family: "Open Sans"; text-decoration: none; } .full-screen{ width: 100%; height: 100vh; overflow: hidden; display: flex; align-items: center; justify-content: center; } .full-screen video{ position: absolute; left: 0; top: 0; width: 100%; height: 100%; object-fit: cover; z-index: -1; } .content a{ display: block; margin: 50px auto; width: 250px; height: 54px; line-height: 54px; background: #ff4655; text-align: center; color: #ececec; text-transform: uppercase; font-weight: 500; transition: .4s linear; } .content a:hover{ background: #0f1923; }
一键获取本网站前端代码设计的所有源码
获取资源构建和完善自己的源码库
源码可以在本地直接演示
同时研究和体验 如何将一些具体的想法的实现过程
源码可以直接嫁接到自己的网站里复用
稍作修改成为自己的作品