跟着实训学习HTML CSS的第二天

在练习五彩导航条的时候,许多同学都卡住了,最后经过分享,大家掌握了许多的方法来解决这个问题,还是很有帮助的。下面就是代码的实现部分:

<!DOCTYPE html>

<html lang="en">

<head>

<meta charset="UTF-8">

<meta http-equiv="X-UA-Compatible" content="IE=edge">

<meta name="viewport" content="width=device-width, initial-scale=1.0">

<title>04五彩导航</title>

<style>

button{

width:120px;

height:58px;

border:none;

 

}

#b1{

background-image: url("images/bg1.png");

background-color: #000000;

}

#b2{

background-image: url(images/bg2.png);

background-color: #000000;

}

#b3{

background-image: url(images/bg3.png);

background-color: #000000;

}

#b4{

background-image: url(images/bg4.png);

background-color: #000000;

}

 

#b1:hover{

background-image: url(images/bg5.png);

 

}

#b2:hover{

background-image: url(images/bg6.png);

 

}

#b3:hover{

background-image: url(images/bg7.png);

 

}

#b4:hover{

background-image: url(images/bg3.png);

 

}

</style>

</head>

<body>

<button type="button" id="b1">五彩导航</button>

<button type="button" id="b2">五彩导航</button>

<button type="button" id="b3">五彩导航</button>

<button type="button" id="b4">五彩导航</button>

</body>

</html>

 


 

<!DOCTYPE html>

<html lang="en">

<head>

<meta charset="UTF-8">

<meta name="viewport" content="width=device-width, initial-scale=1.0">

<meta http-equiv="X-UA-Compatible" content="ie=edge">

<title>表单</title>

<!--样式表的作用是单元格内容自适应宽度,单元格内容对齐,以及去除表单的边框-->

<style>

td

{

white-space: nowrap;

text-align: center;

}

input

{

border: 0;

}

</style>

</head>

<body>

<form action="#" method="POST">

<table align="center" border="1">

<caption><b>个人简历</b></caption> <!--目标表格应该是一个15行7列的表格进行的合并 需要用到colspan横向合并和rowspan纵向合并-->

<tr>

<td>姓名</td>

<td><input type="text" name="name"></td>

<td>性别</td>

<td><input type="text" name="sex"></td>

<td>出生年月</td>

<td><input type="text" name="birth"></td>

<td rowspan="4"><input type="file" name="file"></td>

</tr>

<!--第二行-->

<tr>

<td>民族</td>

<td><input type="text"></td> <!--没有连接到后台数据就没写每个input的name了-->

<td>政治面貌</td>

<td><input type="text"></td>

<td>身高</td>

<td><input type="text"></td>

</tr>

<!--第三行-->

<tr>

<td>学院</td>

<td><input type="text"></td>

<td>学历</td>

<td><input type="text"></td>

<td>户籍</td>

<td><input type="text"></td>

</tr>

<!--第四行-->

<tr>

<td>专业</td>

<td><input type="text"></td>

<td colspan="2">毕业院校</td>

<td colspan="2"><input type="text"></td>

</tr>

<!--第五行 技能特产-->

<tr>

<td colspan="7"><b>技能特长或爱好</b></td>

</tr>

<!--第六行-->

<tr>

<td>外语等级</td>

<td colspan="2"><input type="text"></td>

<td>计算机</td>

<td colspan="3"><input type="text"></td>

</tr>

<!--第七行 个人履历-->

<tr>

<td colspan="7">个人履历</td>

</tr>

<!--第八行-->

<tr>

<td>时间</td>

<td colspan="2">单位</td>

<td colspan="4">履历</td>

</tr>

<tr>

<td><input type="text"></td>

<td colspan="2"><input type="text"></td>

<td colspan="4"><input type="text"></td>

</tr>

<tr>

<td><input type="text"></td>

<td colspan="2"><input type="text"></td>

<td colspan="4"><input type="text"></td>

</tr>

<tr>

<td><input type="text"></td>

<td colspan="2"><input type="text"></td>

<td colspan="4"><input type="text"></td>

</tr>

<!--联系方式-->

<tr>

<td colspan="7">联系方式</td>

</tr>

<tr>

<td>通信地址</td>

<td colspan="2"><input type="text"></td>

<td>联系电话</td>

<td colspan="3"><input type="text"></td>

</tr>

<tr>

<td>E-mail</td>

<td colspan="2"><input type="text"></td>

<td>联系电话</td>

<td colspan="3"><input type="text"></td>

</tr>

<tr>

<td colspan="7">自我评价</td>

</tr>

</table>

<p align="center"><input type="submit"></p>

</form>

</body>

</html>

 


 

评论 3
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值