html 网页login页面编写


index.html:

<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>一个简单的登录网页</title>

<link href="css/index.css" rel="stylesheet" type="text/css">
</head>

<body >
<!--align用于设置子内容的居中-->
<div align="center">
    <br><br><br><br>
    <h2>登录例子</h2>
    <div id="center">
        <!--登录输入框-->
        <div class="login"  align="left">
           <div class="login_line" style="margin-top:35px">
                <div style="float:left;margin-left:10px">账号:</div>
                <input type="text" style="width:140px;float:left;margin-left:10px"/>           
           </div>
           
           <div class="login_line">
                <div style="float:left;margin-left:10px">密码:</div>
                <input type="password" style="width:140px;float:left;margin-left:10px"/>           
           </div>
           
           <div class="login_line">
                <input type="button" value="登录" style="width:60px;float:left;margin-left:10px"/>
                <input type="button" value="重置" style="width:60px;float:left;margin-left:10px"/>           
           </div>
           
        </div>
        <img style="width:100px; height:100px; float:left;margin:350px 0px 0px 200px;border-radius:50px" src="img/leaf.jpg">
        
    </div> 
</div>

</body>
</html>

 

 

index.css代码如下

#center {
    width:800px;
    height:500px; 
    background-image:url(../img/bg.png);
    background-repeat:no-repeat;
    margin:50px 0px 0px 0px;
}
#center .login {
    float: left;
    height: 150px;
    width: 230px;
    margin: 150px 0px 0px 100px;
}
#center .login_line {
    width:204px;
    height:30px;
    margin-top: 5px;
    color: #FFFFFF;
}

 

 笔记:引入css的方式:<link href="css/index.css" rel="stylesheet" type="text/css">

图片圆弧处理:<img style="width:100px; height:100px;;border-radius:50px" src="img/leaf.jpg">

radius弧度,是以xx长的半径画圆,来处理的

 


免责声明!

本站转载的文章为个人学习借鉴使用,本站对版权不负任何法律责任。如果侵犯了您的隐私权益,请联系本站邮箱yoyou2525@163.com删除。



 
粤ICP备18138465号  © 2018-2025 CODEPRJ.COM