首页 试题广场 > 试题详情
问答题

使用div+css的方式简单实现一个如图所示的登录界面,要求如下:
1)登录部分(灰色部分)的宽度为300px,在整个页面中央显示;
2)登录部分背景色为#CCC,字体颜色为#FF0000:

回复可见正确答案
下一题 上一题
Ke星伙伴们的回答/ 14个回答 添加答案
  • sunny945hui 1楼

    写代码吗?

    发表时间:2016-02-15 16:42:45 评论 0

  • 生来孤独 2楼

    <style>

    .topdiv{

    background-color:gray;

    }

    topdiv input{

    color:black;

    }

    .div1 input{

    background-color:#ccc;

    text-align:center;

    }

    </style>


    <div class="topdiv">

    <form>

    账号:<input type="text">

    密码:<input type="password">

    <div class="div1">

    <input type="text"value="登录"name="dl">

    </form>

    </div>

    发表时间:2016-02-23 21:57:31 评论 0

  • null008 3楼

    a


    发表时间:2016-04-27 12:21:51 评论 0

  • 逸枫2458 4楼

     #divLogin{
    
      width:300px;
    
      height:200px;
    
      background-color:#CCC;
    
      color:#FF0000;
    
      text-align:center;
    
      padding-top:50px;
    
     }


    发表时间:2016-05-07 10:33:23 评论 0

  • 哇哈哈8560 5楼

    发给我
    发表时间:2016-05-27 12:00:23 评论 0

  • 锦衣素袖 6楼

    不会
    发表时间:2016-06-11 16:48:58 评论 0

  • zkx2133 7楼

    1223
    发表时间:2016-06-12 07:13:18 评论 0

  • czjjj 8楼

    c

    发表时间:2016-06-23 10:57:11 评论 0

  • 好耐矛见 9楼


    <div class="topdiv">

    <form align=center>

    账号:<input type="text">

    密码:<input type="password">

    <div class="div1">

    <input type="text"value="登录"name="dl">

    </form>

    </div>


    发表时间:2016-08-01 21:53:33 评论 0

  • 温柔小王子 10楼

    
    
        
        简单登录界面
        
            .{
                : ;
                : ;
                : ;
                : ;
                : ;
            }
            {
                : ;
                : %;
                : ;
    
            }
             {
                 : ;
                 : ;
                 : ;
             }
            .{
                : ;
            }
            [=]{
                : ;
            }
        
    
    
    
    登录界面
        
        用户名:
        
        
        密码:


    发表时间:2016-10-22 17:05:51 评论 0

  • 温柔小王子 11楼

    <!--格式错误,重发一下-->

    <!DOCTYPE html>
    <html>
    <head lang="en">
       <meta charset="UTF-8">
       <title>简单登录界面</title>
       <style>
           .content{
               width: 300px;
               margin: auto auto;
               background-color: #CCC;
               border: 1px black solid;
               color: #FF0000;
           }
           h3{
               font-size: 16px;
               width: 100%;
               text-align: center;

           }
            label{
                display: inline-block;
                width: 80px;
                text-align: right;
            }
           .term{
               margin: 10px 0;
           }
           input[type="submit"]{
               color: #FF0000;
           }
       </style>
    </head>
    <body>
    <form action="" method="post" class="content">
    <h3>登录界面</h3>
       <div class="term">
       <label>用户名:</label><input type="text"/>
       </div>
       <div class="term">
       <label>密码:</label><input type="password"/>
       </div>
       <div class="term">
           <label></label>
           <input type="submit" value="登录" />
       </div>
    </form>
    </body>
    </html>

    发表时间:2016-10-22 17:07:38 评论 0

  • 大鹏鸟3962 12楼

    
    
        
        login
        
            {
                : ;
                : ;
                : ;
                : ;
            }
            {
                : ;
                : ;
                : ;
                : ;
                : ;
                : ;
                : ;
            }
            {
                : ;
                : ;
            }
        
    
    
        
            
                name
                
            
            
                password


    发表时间:2017-01-17 18:15:00 评论 0

  • 大鹏鸟3962 13楼

    <!DOCTYPE html>
    <html lang="en">
    <head>
        <meta charset="UTF-8">
        <title>login</title>
        <style>
            #container{
                width: 300px;
                background-color: orange;
                margin: 0 auto;
                padding: 20px;
            }
            span{
                width: 80px;
                height: 40px;
                line-height: 40px;
                margin-left: 20px;
                color: white;
                display: inline-block;
                text-align: right;
            }
            input{
                height: 30px;
                margin-bottom: 10px;
            }
        </style>
    </head>
    <body>
        <div id="container">
            <div id="name">
                <span>name</span>
                <input type="text">
            </div>
            <div id="password">
                <span>password</span>
                <input type="password">
            </div>
        </div>
    </body>
    </html>


    发表时间:2017-01-17 18:16:07 评论 0

  • 菜鸟程序猿 14楼

    <style>

    .topdiv { width:300px; margin: 0 auto;}

    topdiv form{color:#FF0000;}

    .div1 input{ background-color:#ccc; text-align:center;}

    </style>


    <div class="topdiv">

    <form>

    账号:<input type="text">

    密码:<input type="password">

    <div class="div1">

    <input type="text"value="登录"name="dl">

    </form>

    </div>


    发表时间:2017-02-05 10:44:00 评论 0

关闭
关闭
QQ
交流群
邀请
好友
App
下载
意见
反馈
返回
顶部