其他分享
首页 > 其他分享> > 《网页设计与制作项目教材》-Chapter06千年之恋 -20210605

《网页设计与制作项目教材》-Chapter06千年之恋 -20210605

作者:互联网

注意表单的使用
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=utf-8" />
<title>千年之恋</title>
<link href="css/style06.css" type="text/css" rel="stylesheet" />
</head>
<body>
<div id="header"><img src="images/logo.jpg" alt=""></div>
<div id="nav_bg">
    <ul class="nav">
        <li><a href="#">首页</a></li>
        <li><a href="#">会员</a></li>
        <li><a href="#">活动</a></li>
        <li><a href="#">直播</a></li>
        <li><a href="#">视频</a></li>
        <li><a href="#" class="bg">注册</a></li>
    </ul>
</div>
<div id="banner">
    <img src="images/banner.jpg" alt="">
</div>
<div id="content">
    <h2 class="step">注册步骤:</h2>
    <form action="#" method="post" class="one">
        <h3>您的账号信息:</h3>
        <table class="content">
            <tr>
                <td class="left">注册方式:</td>
                <td>
                    <label for="one"><input type="radio" name="sex" id="one">E-mail注册</label>&nbsp;&nbsp;&nbsp;&nbsp;
                    <label for="two"><input type="radio" name="sex" id="two">手机号码注册</label>&nbsp;&nbsp;&nbsp;&nbsp;
                </td>
            </tr>
            <tr>
                <td class="left">注册邮箱:</td>
                <td><input type="text" class="right"></td>
            </tr>
            <tr>
                <td class="left">注册手机:</td>
                <td><input type="text" class="right"></td>
            </tr>
            <tr>
                <td class="left">登录密码:</td>
                <td><input type="text" class="right"></td>
            </tr>
            <tr>
                <td class="left">昵称:</td>
                <td><input type="text" class="right"></td>
            </tr>
        </table>
        <h3>您的个人信息:</h3>
        <table class="content">
            <tr>
                <td class="left">性别:</td>
                <td>
                    <label for="boy"><input type="radio" name="sex" id="one">男&nbsp;&nbsp;&nbsp;</label>
                    <label for="girl"><input type="radio" name="sex" id="two">女&nbsp;&nbsp;&nbsp;</label>
                </td>
            </tr>
            <tr>
                <td class="left">学历:</td>
                <td>
                    <select>
                        <option>-请选择-</option>
                        <option>中职/高中</option>
                        <option>专科/本科</option>
                        <option>硕士研究生</option>
                        <option>博士研究生</option>
                    </select>
                </td>
            </tr>
            <tr>
                <td class="left">所在城市:</td>
                <td>
                    <select>
                        <option>-请选择-</option>
                        <option selected="selected">北京</option>
                        <option>上海</option>
                        <option>广州</option>
                        <option>深圳</option>
                    </select>
                </td>
            </tr>
            <tr>
                <td class="left">兴趣爱好:</td>
                <td>
                    <input type="checkbox" />足球&nbsp;&nbsp;&nbsp;
                    <input type="checkbox" />篮球&nbsp;&nbsp;&nbsp;
                    <input type="checkbox" />游泳&nbsp;&nbsp;&nbsp;
                    <input type="checkbox" />唱歌&nbsp;&nbsp;&nbsp;
                    <input type="checkbox" />跑步&nbsp;&nbsp;&nbsp;
                    <input type="checkbox" />瑜伽
                </td>
            </tr>
            <tr>
                <td class="left">自我介绍:</td>
                <td>
                    <textarea cols="60" rows="8">评论的时候,请遵纪守法并注意语言文明,多给文档分享人一些支持。</textarea>
                </td>
            </tr>
            <tr>
                <td colspan="2">
                    <input type="button" class="but">
                </td>
            </tr>
        </table>        
    </form>
</div>
<div id="footer">
    <p>Copyright © 2006-2016 QIANNIANZHILIANcom, All rights reserved.<br />2001-2018,版权所有 千年之恋 85CP备13385453</p>
</div>
</body>
</html>

CSS

@charset "utf-8";
/* CSS Document */
*{margin:0; padding:0; list-style:none; outline:none; border:0; background:none;}
body{font-family:"微软雅黑"; font-size:14px; }
a:link,a:visited{text-decoration: none; color: #fff;font-size: 16px;}
#header{
	width: 980px;
	height: 70px;
	margin: 0 auto;
	padding-top: 20px;
}
#nav_bg{
	width: 100%;
	height: 48px;
	background:#fe668f;
}
.nav{
	width: 980px;
	margin: 0 auto;
}
.nav li{
	float: left;
}
a{
	display: inline-block;
	height: 48px;
	line-height: 48px;
	padding:0 50px;
}
.bg{background: #fe9ab5;}
a:hover{background: #fe9ab5;}

#banner{
	width: 980px;
	height: 429px;
	margin: 0 auto;
}

#content{
	width: 830px;
	height: auto;
	background: url(../images/content_bg.jpg) no-repeat;
	margin: 0 auto;
	padding-left:150px;
}
.step{
	width: 454px;
	height: 80px;
	font-size: 20px;
	font-weight: 100;
	color: #dd8787;
	line-height: 80px;
	background: url(../images/step.jpg) center right no-repeat;
}
h3{
	width: 454px;
	height: 45px;
	font-size: 20px;
	font-weight: 100;
	color: #dd8787;
	line-height: 45px;
	border-bottom: 1px solid #dd8787;
}
td{
	height: 50px;
	color: #dd8787;
}
.left{
	width: 120px;
	text-align: right;
}
.right{
	width: 320px;
	height: 28px;
	border: 1px solid #dd8787;
}
input{vertical-align: middle;}
select{
	width: 200px;
	border: 1px solid #dd8787;
	color: #dd8787;
}
textarea{
	width: 380px;
	border: 1px solid #dd8787;
	resize: none;
	font-size: 12px;
	color: #aaa;
	padding: 20px;
}
.but{
	width: 400px;
	height: 50px;
	background: url("../images/btn.jpg") right center no-repeat;
	padding: 0 0 100px;
}

#footer{
	width:100%; 
	height:68px;
	line-height:26px;
	background:#fe668f; 
	color:#fff; 
	text-align:center;
	padding-top:40px; 
}

网页效果
在这里插入图片描述
在这里插入图片描述

标签:dd8787,之恋,height,Chapter06,width,nbsp,background,20210605,font
来源: https://blog.csdn.net/m0_46629123/article/details/117593123