html5入门练习(一)

  • 表单练习

html5入门练习(一)

<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>表单</title>
</head>
<body>
    <form action="">
        邮箱地址:
        <input type="text" placeholder="请输入邮箱地址">
        @
        <select name="" id="">
            <option value="">163.com</option>
            <option value="">132.com</option>
            <option value="">666.com</option>
        </select>
        <br><br>
        密码:
        <input type="password">
        <br><br>
        性别:
        <input type="radio">男
        <input type="radio" checked>女
        <br><br>
        验证码:
        <input type="text">
        <br><br>
        <button>免费获取验证码</button>
        <br><br>
        备注:
        <textarea name="" id="" cols="30" rows="10"></textarea>
        <br><br>
        <input type="checkbox">
        同意<a href="#">“服务条款”</a>和“隐私权相关政策”
        <br><br>
        <button>提交</button>
        &nbsp;&nbsp;
        <button>重置</button>
    </form>
</body>
</html>
  • 百度页面练习
    (我就用了谷歌的图片,没有百度的)
    html5入门练习(一)
<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>谷歌</title>
    <style>
        body{
            text-align: center;
        }
        .two{
            color: black;
        }
        .txt{
            width: 300px;
            height: 30px;
        }
    </style>
</head>
<body>
    <img src="mipmip/guge.png" alt="">
    <br><br>
    <form action="">
        <a href="">新闻</a>
        <a href="" class="two">网页</a>
        <a href="">贴吧</a>
        <a href="">知道</a>
        <a href="">音乐</a>
        <a href="">图片</a>
        <a href="">视频</a>
    </form>
    <br>
    <input type="text" class="txt">
    <input type="submit" value="谷歌一下">
    <br>
    <br>
    <form action="">
        <a href="">新闻</a>
        <a href="" class="two">网页</a>
        <a href="">贴吧</a>
        <a href="">知道</a>
        <a href="">音乐</a>
        <a href="">图片</a>
        <a href="">视频</a>
    </form>
</body>
</html>

**

  • 登录页面
    html5入门练习(一)
<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
    <style>
        body{
            background: url(mipmip/login.jpg);
            background-repeat: no-repeat;
            background-size: 100% auto;
        }
        #login-box{
            text-align: center;
            width: 30%;
            height: auto;
            margin: 0 auto;
            margin-top: 13%;
            padding: 20px 50px;
            background-color:#00000060;
        }
        #login-box h1{
            color: #fff;
        }
        #login-box .form .item{
            margin-top: 15px;
        }
        #login-box .form .item i{
            font-size: 18px;
            color: #fff;
        }
        #login-box .form .item input{
            width: 180px;
            font-size: 18px;
            border: 0;
            border-bottom: 2px solid #fff;
            padding: 5px 10px;
            background: #ffffff00;
            color: #fff;
        }
        #login-box button{
            margin-top: 20px;
            width: 180px;
            height: 30px;
            font-size: 20px;
            font-weight: 700;
            color: #fff;
            background-image: linear-gradient(to right,#74ebd5 0%,#9face6 100%);
            border: 0;
            border-radius: 15px;
        }
        
    </style>
</head>
<body>
    <div id="login-box">
        <h1>登录</h1>
        <div class="form">
            <div class="item">
                <i class="fa fa-github-alt" style="font-size: 24px;"></i>
                <input type="text" placeholder="Username">
            </div>
            <div class="item">
                <i class="fa fa-search" style="font-size: 24px;"></i>
                <input type="text" placeholder="Password">
            </div>
        </div>
        <button>登录</button>
    </div>
</body>
</html>

(ps:在网络上找的案例进行的练习,不知道具体是哪个博主写的,9.25html练习打卡)

上一篇:【Go Web学习笔记】第二章 HTTP实现客户端


下一篇:html5基本元素标签学习(学习笔记)(未完)