zoukankan      html  css  js  c++  java
  • 带图标的登陆框

    效果图:

     HTML文件

    <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
    <html xmlns="http://www.w3.org/1999/xhtml">
    <head>
    <meta http-equiv="Content-Type" content="text/html; charset=gb2312" />
    <title>带图标的登陆框</title>
    <link href="style/style.css" rel="stylesheet" type="text/css" />
    </head>
    <body>
    
    
    
    <div id="sidebar">
        <h3>请输入登录的用户名和密码</h3>
        <form method="post" action="index.html">
            <label for="username">Username</label>
            <input type="text" name="username" id="username" class="text username" />
            <label for="password">Password</label>
            <input type="password" name="password" id="password" class="text password" />
            <a href="###">Get your Password?</a>
            <input type="submit" value="" class="submit" />
        </form>
    </div>
    
    </body>
    </html>

    样式文件:

    body {
        background:#fff;
        font-size:12px;
    }
    div{
        margin:0 auto;
    }
    #sidebar h3 {
        font-size:12px;
        font-weight:normal;
        background:url(../images/warning.gif) no-repeat left center;
        padding:0 0 0 20px;
    }
    #sidebar form * {
        display:block;
        margin:8px 0;
    }
    #sidebar form label {
        font-weight:bold;
    }
    #sidebar form input.text {
        width:160px;
        height:18px;
        border:1px solid #999;
        background:#fff;
        color:#999;
    }
    #sidebar form input.username {
        background:url(../images/username.gif) no-repeat 2px center;
        padding:0 0 0 20px;
    }
    #sidebar form input.password {
        background:url(../images/password.gif) no-repeat 2px center;
        padding:0 0 0 20px;
    }
    #sidebar form a {
        width:180px;
        color:#f60;
    }
    #sidebar form input.submit {
        width:70px;
        height:21px;
        background:url(../images/loginin.gif) no-repeat;
        border:none;
        cursor:pointer;
        margin:0 0 0 60px;
    }
  • 相关阅读:
    从12306.cn谈大网站架构与性能优化
    新浪微博的存储思路整理架构分享--微博架构的回顾
    多吃以上食物可以调理内分泌
    脸部护理
    美容实用小知识
    如何把网页或html内容生成图片
    互联网阅读与知识积累流程化实践分享
    怎样与人沟通?
    如何控制情绪
    如何去掉Google搜索的跳转 让你的Google搜索不被reset掉
  • 原文地址:https://www.cnblogs.com/LO-ME/p/3617673.html
Copyright © 2011-2022 走看看