千年之恋HTML5和CSS3

提示:文章写完后,目录可以自动生成,如何生成可参考右边的帮助文档

文章目录


前言


提示:以下是本篇文章正文内容,下面案例可供参考

例题

利用 input和导航栏制作页面

二、使用步骤

1.引入库

代码如下(示例):


<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" 
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>千年之恋</title>
<style>
*{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; 
}

</style>
</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>

2.读入数据


总结

提示:这里对文章进行总结:
例如:以上就是今天要讲的内容,本文仅仅简单介绍了HTML5和CSS3的使用,背景图片自己插入

background:url(图片地址);

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

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

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

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值