简单的静态页面

1、页面展示

2、HTML代码

1、link链接css

2、创建表单

3、创建input输入框

4、创建p段落

<!DOCTYPE html>
<html lang="en">
    <head>
        <meta charset="utf-8">
        <link rel="stylesheet" type="text/css" href="style.css" />
    </head>
    <body>
    <form action="">
        <input class="style1" type="text" name="" value="" placeholder="账号">
        <br />
        <input class="style2" type="password" name="" value="" placeholder="密码">
        <br />
       <div align="center">
       <input class="style3" align="center" type="submit" name="" value="登录">
        <br />
        <p>版权所有&copy;hqyj.com</p>
           
       </div> 
    </form>
    </body>
</html>

重点:对submit类型的input进行居中,创建div块给居中属性

3、CSS代码

给每个模块对应的属性和属性值

注意:./images文件需要在当前目录下

*{
    margin: 0;
    padding: 0;
}
img{
    border:0;
}
ol, ul ,li{list-style: none;} 
body{
    background-image: url(./images/bgt.jpeg);
}
form{
    box-shadow: 0 2px 12px 0 rgba(0, 0, 0, 0.5);
    position: absolute;
    left: 50%;
    top: 50%;
    transform: translate(-50%, 0);
}
form .style1{
    width: 333px;
    height: 50px;
    border-radius: 30px;
    padding-left: 20px;
    border: none;
}
form .style2{
    width: 333px;
    height: 50px;
    border-radius: 30px;
    padding-left: 20px;
    border: none;
    margin-top: 20px;
    margin-bottom: 20px;
}

form .style3{
    width: 314px;
    height: 50px;
    background-image: url(./images/bgt.jpeg);
    color:white;
    font-size: 22px;

}
p{
    text-align: center;
}

  • 3
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值