web开发笔记——login页面(上)

一、简单的商城登录页面制作流程

1.先建立一个项目文件夹,将自己的所需要的素材拖入项目文件夹的images文1件,在建立一个文本index.html,格式改成.html格式。

2.查看效果图,看看你所做的登录页面将要呈现什么效果,并且将它分成块。

这是一个简单的登录页面,可以将其分为两层,第一层是背景图;第二层是登录框(嵌套在背景图中),登录框还能够分为两部分,上面的主体,下面的登录链接。

3.我用的代码编辑器是sublime text3,可以在软件中直接打开项目文件,找到index.html打开,html文件的基础内容就不说了

4.用<div></div>分层,如同2所说的一样——大-中-两小。

5.这个简单的页面中,我并没有单独建立css文件,而是在<style type="text/css"></style>中去定义样式:背景.wrap{};;登录框.login{margin:; width:; height:; background:;};;主体.form-wrap{width:100%; height:; border-bottom:     dotted    ;/*分割线*/      padding-top:;/*顶部填充高度*/}     登录链接.login-link{}       文本.text{width:; height:; margin-bottom:; border-radius:;/*边框圆角*/   border:     solid #xxx;/*边框线*/        background-repeat:no-repeat; background-position:;    text-indent:;/*文本缩进*/         .user{}    .pwd{}          .sub{}          

以上属于定义样式表

 6.    可以参照第四条,可以直接输入。要input,就要使用<form>;

附:

<!DOCTYPE html>
<html>
    <head>
         <meta charset="utf-8"/>
         <title>登录页面</title>

         <style type="text/css">
         
         body{
              margin:0;
         }
        .wrap{
             width:100%;
             min-width:1200px;
             height:520px;
             background:url("images/dlbg.jpg") center;
             overflow:hidden;
         }
        .login{
              /*position:absolute;
              right:130px;
              top:100px;*/
              /*float:right;
              margin:100px 130px 0 0;*/
              margin:100px 130px 0 auto;
              width:340px;
              height:320px;
              background:#FFF;
        }
        .form-wrap{
              width:100%;
              height:220px;
              border-bottom:1px dotted #000;
              text-align:center;
              padding-top: 40px
              
         }
        .login-link{
              width:100%;
              height:100px;
              text-align:center;
        }
        .text{
              width:249px;
              height:40px;
              margin-bottom:20px ;
              border-radius:5px;
              border:1px solid #333;
              background-repeat: no-repeat;
              background-position: -1px;
              text-indent:50px ;
             
         }
        .user{
              background-image:url("images/zhanghao.jpg");
              background-repeat-x: no-repeat;
              background-position-y: -1px;
              }
        .pwd{
              background-image:url("images/mima.jpg");
              background-repeat-x: no-repeat;
              background-position-x: 0px;
              }
        .sub{
              width:255px;
              height:44px;
              background:url("images/but.jpg");
              border-width:0;
         }
              
         </style>
    </head>
    <body>
         <div class="wrap">
              <div class="login">
                   <div  class="form-wrap">
                        <form action="">
                             <input type="text" class="user text" placeholder="用户名"/>
                             <input type="password"  class="pwd text" placeholder="密码"/>
                             <input type="submit" class="sub" value=""/>
                        </form>
                   </div>
                    <div class="login-link">
                            <p>
                                合作网站账号登录:
                                <img src="images/qqlogin.png" alt=""/>
                                <img src="images/taobao.png" alt=""/>
                                <img src="images/weixin.png" alt=""/>
                        
                        </div>
                   </div> 
              </div>
        </div>
    </body>
</html>

结束

 

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值