使用Bootstrap4製作登陸介面
阿新 • • 發佈:2019-01-25
實現效果:
標準的登陸頁面:
<!DOCTYPE html> <html> <head> <meta charset="utf-8"> <title>首頁</title> <meta name="viewport" content="width=device-width, initial-scale=1"> <link rel="stylesheet" href="https://cdn.bootcss.com/bootstrap/4.0.0-beta/css/bootstrap.min.css"> <script src="https://cdn.bootcss.com/jquery/3.2.1/jquery.min.js"></script> <script src="https://cdn.bootcss.com/popper.js/1.12.5/umd/popper.min.js"></script> <script src="https://cdn.bootcss.com/bootstrap/4.0.0-beta/js/bootstrap.min.js"></script> <style> .carousel-inner img { width:100%; height:100%; } .jumbotron { margin-top: 10px; margin-bottom: 0px; padding-top: 10px; } #demo { width:100%; height: 264px; } .row { height: 264px; } .left { float: left; width: 70%; } .right { float: left; width: 30%; } .card { height: 264px; } .carousel-inner { height: 264px; } .footer { position: absolute; bottom: 0; height: 60px; } .jumheight1 { height: 140px; } .jumheight2 { height: 260px; } .end_name { margin-bottom: 5px; } .footer2 { padding-top: 210px; text-align: center; } </style> <script type="text/javascript"> function Toregister() { window.open("register.html") } </script> </head> <body> <div> <div class="jumbotron text-info bg-light jumheight1"> <h1>工時管理系統</h1> <p>一個簡單的系統</p> </div> <!-- 輪播圖 --> <!-- 指示符 --> <div class="row"> <div class="left"> <div id="demo" class="carousel slide " data-ride="carousel"> <ul class="carousel-indicators"> <li data-target="#demo" data-slide-to="0" class="active"></li> <li data-target="#demo" data-slide-to="1"></li> <li data-target="#demo" data-slide-to="2"></li> </ul> <!-- 輪播圖片 --> <div class="carousel-inner"> <div class="carousel-item active"> <img src="http://static.runoob.com/images/mix/img_fjords_wide.jpg"> </div> <div class="carousel-item"> <img src="http://static.runoob.com/images/mix/img_nature_wide.jpg"> </div> <div class="carousel-item"> <img src="http://static.runoob.com/images/mix/img_mountains_wide.jpg"> </div> </div> <!-- 左右切換按鈕 --> <a href="#demo" class="carousel-control-prev" data-slide="prev"> <span class="carousel-control-prev-icon"></span> </a> <a href="#demo" class="carousel-control-next" data-slide=next> <span class="carousel-control-next-icon"></span> </a> </div> </div> <div class="right"> <!-- 登陸視窗 --> <div class="card"> <div class="card-header"> 使用者登陸 </div> <div class="card-body"> <form> <table style="border-collapse: separate;border-spacing: 0px 10px;"> <tr> <td class="margin-top:10"> <label>使用者名稱:</label> </td> <td> <input type="text" name="" class=""> </td> </tr> <tr> <td> <label for="pwd">密碼:</label> </td> <td> <input type="password" name="" > </td> </tr> </table> <div class="form-check"> <label class="form-check-label"> <input type="checkbox" name="" class="form-check-input">記住密碼 </label> </div> <div class="footer"> <button type="submit" class="btn btn-primary">登陸</button> <button type="" class="btn btn-secondary" onclick="Toregister()">註冊</button> <button type="button" class="btn btn-link"><small>忘記密碼?</small></button> </div> </form> </div> </div> </div> </div> <div class="jumbotron bg-light jumheight2"> <p class="footer2">@Master_huangyx</p> </div> </div> </body> </html>