• 视频作为背景的表单


    最终效果:

    代码:

    <!DOCTYPE html>
    <html>
    <head lang="en">
      <meta charset="UTF-8">
      <link rel="stylesheet" href="css/bootstrap.css"/>
      <style>
        .container {
          position: relative;
        }
    
        .bg-video {
          position: absolute;
          z-index: -1;
        }
    
        .box {
          background: rgba(255, 255, 255, 0.8);
          width: 70%;
          min-height: 300px;
          border-radius: 5px;
          box-shadow: 0 0 5px #aaa;
          margin: 80px auto;
          padding: 20px;
        }
      </style>
    </head>
    <body>
    <div class="container">
      <!--用作背景的视频-->
      <video class="bg-video" src="res/birds.mp4" autoplay loop muted width="100%"></video>
      <!--用作盛放表单的盒子,半透明背景-->
      <div class="box">
        <form class="form-horizontal">
          <!--用户名-->
          <div class="form-group">
            <div class="col-sm-2">
              <label for="uname" class="control-label">用户名:</label>
            </div>
            <div class="col-sm-5">
              <input type="text" class="form-control" placeholder="请输入用户名" autofocus name="uname" id="uname" required/>
            </div>
            <div class="col-sm-5">
              <span class="help-block">用户名可以包含数字、字母</span>
            </div>
          </div>
    
          <!--密码-->
          <div class="form-group">
            <div class="col-sm-2">
              <label for="upwd" class="control-label">密码:</label>
            </div>
            <div class="col-sm-5">
              <input type="text" class="form-control" placeholder="请输入密码" autofocus name="upwd" id="upwd" required
                     minlength="6" maxlength="12">
            </div>
            <div class="col-sm-5">
              <span class="help-block">密码长度在6~12位之间</span>
            </div>
          </div>
    
          <!--提交按钮-->
          <div class="form-group">
            <div class="col-sm-5 col-sm-offset-2">
              <input type="button" value="提交注册信息" class="btn btn-success btn-block">
            </div>
          </div>
        </form>
      </div>
    </div>
    </body>
    </html>
  • 相关阅读:
    bzoj1014: [JSOI2008]火星人prefix
    bzoj1934: [Shoi2007]Vote 善意的投票&&bzoj2768:[JLOI2010]冠军调查
    bzoj2705: [SDOI2012]Longge的问题
    bzoj4653: [Noi2016]区间
    bzoj2456: mode
    bzoj5018: [Snoi2017]英雄联盟
    关于树论【左偏树】
    caioj1522: [NOIP提高组2005]过河
    caioj1421&&hdu2167: [视频]【状态压缩】选数
    Linux下全局安装composer方法
  • 原文地址:https://www.cnblogs.com/web-fusheng/p/6906595.html
Copyright © 2020-2023  润新知