H5 笔记(登录界面)

index.css

body{
    background-color: #F2F2F2;
}

/*------主要内容-------*/
#content{
    margin-top: 100px;
    text-align: center;
}

#content .panel{
    display: inline-block;
    background-color: white;
    border: 1px solid #ddd;
    border-radius: 5px;
    padding: 20px;
}

#content .panel .group{

}

/*输入框*/
#content .panel .group input{
    display: block;
    width: 250px;
    height: 33px;
    padding-left: 7px;
    font-size: 15px;
    border:1px solid #ddd;
}

/*伪类*/
#content .panel .group input:focus{
    outline: none;
    border-left-color: #CC865E;
}

#content .panel .group label{
    display: block;
    text-align: left;
    height: 30px;
    line-height: 30px;
    font-size: 20px;

}

#content .login {
    margin-top: 20px;
}

/*登录*/
#content .login button{
    width: 250px;
    background-color: #CC865E;
}

#content .login button:hover{
    background-color: white;
    color: #CC865E;
    border: 1px solid  #CC865E;
    cursor: pointer;
}

#content button{
    height: 33px;
    border: 0px;
    color: white;
    font-size: 18px;
}

/*注册*/
#content .reg{
    margin-top: 20px;
}

#content .reg button{
    width: 200px;
    background-color: #466BAF;
}

#content .reg button:hover{
    background-color: white;
    color: #466BAF;
    border: 1px solid #466BAF;
    cursor: pointer;
}

index.html

<!DOCTYPE html>
<html>
<head lang="en">
    <meta charset="UTF-8">
    <title>登录首页</title>
    <link href="css/index.css" rel="stylesheet">
</head>
<body>
<!--最外层-->
   <div id="content">
       <!--面板-->
       <div class="panel">
           <!--账号-->
           <div class="group">
              <label>账号</label>
              <input placeholder="请输入账号名">
           </div>
           <!--密码-->
           <div class="group">
               <label>密码</label>
               <input placeholder="请输入密码" type="password">
           </div>
           <!--登录-->
           <div class="login">
               <button>登录</button>
           </div>
       </div>
       <!--注册-->
       <div class="reg">
           <button>创建新账号?</button>
       </div>
   </div>
</body>
</html>
最后编辑于
©著作权归作者所有,转载或内容合作请联系作者
【社区内容提示】社区部分内容疑似由AI辅助生成,浏览时请结合常识与多方信息审慎甄别。
平台声明:文章内容(如有图片或视频亦包括在内)由作者上传并发布,文章内容仅代表作者本人观点,简书系信息发布平台,仅提供信息存储服务。

相关阅读更多精彩内容

  • 问答题47 /72 常见浏览器兼容性问题与解决方案? 参考答案 (1)浏览器兼容问题一:不同浏览器的标签默认的外补...
    _Yfling阅读 14,696评论 1 92
  • 效果图: 我使用的开发工具是JetBrains Webstorm,自行百度下,IDE很多,只是我很喜欢这个界面: ...
    Hither阅读 21,777评论 5 15
  • 转载请声明 原文链接地址 关注公众号获取更多资讯 第一部分 HTML 第一章 职业规划和前景 职业方向规划定位...
    前端进阶之旅阅读 16,750评论 32 459
  • 花胶乃“八珍”之一,花胶素具“海洋人参”之誉导语讲得那么高大上,一下来画风就变了。一般人提起花胶都只会想到煲汤,对...
    下午茶MENU阅读 3,114评论 0 1
  • “萝卜白菜各有所爱”说的就是不凭自己喜好断定好坏。凡事的存在必有其合理性。之前也分享过一篇关于萝卜的文章——《萝卜...
    食趣菜菜屋阅读 3,064评论 3 9

友情链接更多精彩内容