从今天开始我会把每日的作业分享在这里,以后可以时常回来观看曾经有哪些代码错误和格式错误,督促自己不断前进:
1.目标图:
完成代码:
<!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>Document</title>
<style>
.bigbox {
width: 222px;
height: 320px;
background-color: rgb(245, 249, 252);
border: 2px solid rgb(170, 203, 238);
}
li {
list-style: none;
height: 31px;
width: 212px;
border-top: 1px solid rgb(207, 226, 245);
}
ul {
padding-left: 5px;
margin: 0 0 0 0;
}
span {
line-height: 30px;
}
a {
display: inline-block;
height: 30px;
color: black;
text-decoration: none;
line-height: 30px;
}
li + li > img {
vertical-align: middle;
float: right;
}
</style>
</head>
<body>
<div class="bigbox">
<ul>
<li>
<img src="./图片素材/title_icon.gif" alt="1" class="p1" /><span
>课程导航</span
>
</li>
<li>
<a href="#">ACCP 软件工程师</a>
<img src="./图片素材/图片素材.png" alt="1" />
</li>
<li>
<a href="#">BTEST 软件测试工程师</a>
<img src="./图片素材/图片素材.png" alt="1" />
</li>
<li>
<a href="#">BENET 网络工程师</a>
<img src="./图片素材/图片素材.png" alt="1" />
</li>
<li>
<a href="#">JBNS 网站工程师</a>
<img src="./图片素材/图片素材.png" alt="1" />
</li>
<li>
<a href="#">ACCP 启蒙星</a>
<img src="./图片素材/图片素材.png" alt="1" />
</li>
<li>
<a href="#">ANDROID 软件工程师</a>
<img src="./图片素材/图片素材.png" alt="1" />
</li>
<li>
<a href="#">JAVA 软件工程师</a>
<img src="./图片素材/图片素材.png" alt="1" />
</li>
<li>
<a href="#">.NET 软件工程师</a>
<img src="./图片素材/图片素材.png" alt="1" />
</li>
<li>
<a href="#">网络营销 </a>
<img src="./图片素材/图片素材.png" alt="1" />
</li>
</ul>
</div>
</body>
</html>
完成效果图:
2. 目标图:
完成代码:
<!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>Document</title>
<style>
.bigbox {
width: 230px;
height: 420px;
border: 1px solid black;
}
li {
list-style: none;
}
ul {
padding-left: 30px;
margin: 0 0 0 0;
}
a {
color: rgb(98, 99, 101);
text-decoration: none;
font-size: 12px;
}
a:hover {
color: red;
}
h3 {
margin: 0 0 0 20px;
color: white;
}
p {
height: 30px;
margin: 0 0 0 0;
line-height: 30px;
}
img {
vertical-align: middle;
}
.smallbox1 {
height: 40px;
line-height: 40px;
background-color: black;
}
.smallbox2 {
height: 120px;
border-bottom: 1px dashed black;
}
.smallbox3 {
height: 100px;
border-bottom: 1px dashed black;
}
.smallbox4 {
height: 55px;
border-bottom: 1px dashed black;
}
</style>
</head>
<body>
<div class="bigbox">
<div class="smallbox1">
<h3>全部分类</h3>
</div>
<div class="smallbox2">
<p><img src="./图片素材/icon_01.gif" alt="1" /><span>护肤</span></p>
<ul>
<li>
<a href="#">洁面</a> <a href="#">化妆水</a> <a href="#">喷雾</a>
<a href="#">美容液</a> <a href="#">眼霜</a>
</li>
<li>
<a href="#">眼部精华</a> <a href="#">眼膜</a> <a href="#">面膜</a>
<a href="#">面膜贴</a>
</li>
<li>
<a href="#">水洗面膜</a> <a href="#">免洗面膜</a>
<a href="#">精华</a> <a href="#">精油</a>
</li>
<li>
<a href="#">凝露</a> <a href="#">乳液</a> <a href="#">面霜</a>
<a href="#">日霜</a> <a href="#">晚霜</a>
</li>
</ul>
</div>
<div class="smallbox3">
<p><img src="./图片素材/icon_02.gif" alt="1" /><span>彩妆</span></p>
<ul>
<li>
<a href="#">卸妆</a> <a href="#">防晒</a> <a href="#">隔离</a>
<a href="#">粉底</a> <a href="#">粉饼</a>
</li>
<li>
<a href="#">睫毛膏</a> <a href="#">眼影</a> <a href="#">唇彩</a>
<a href="#">眼线笔</a> <a href="#">腮红</a>
</li>
<li>
<a href="#">底妆</a> <a href="#">遮瑕</a> <a href="#">眉笔</a>
<a href="#">美甲</a>
</li>
</ul>
</div>
<div class="smallbox4">
<p><img src="./图片素材/icon_03.gif" alt="1" /><span>香氛</span></p>
<ul>
<li>
<a href="#">男香</a> <a href="#">女香</a> <a href="#">小样</a>
<a href="#">中性香水</a>
</li>
</ul>
</div>
<div class="smallbox5">
<p><img src="./图片素材/icon_04.gif" alt="1" /><span>身体护理</span></p>
<ul>
<li>
<a href="#">洗发</a> <a href="#">护发</a> <a href="#">身体乳</a>
<a href="#">手足护理</a>
</li>
<li>
<a href="#">护手霜</a> <a href="#">纤体</a> <a href="#">身体精油</a>
<a href="#">颈部护理</a>
</li>
<li>
<a href="#">个人护理</a> <a href="#">卫生用品</a>
<a href="#">脱毛</a>
</li>
</ul>
</div>
</div>
</body>
</html>
完成效果图:
3. 目标图:
完成代码:
<!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>Document</title>
<style>
#bigbox {
width: 230px;
height: 170px;
border: 2px solid rgb(230, 230, 230);
}
#smallbox1 {
height: 45px;
border-bottom: dotted rgb(233, 233, 226) 2px;
background-image: -webkit-linear-gradient(
bottom,
rgb(255, 255, 255),
rgb(206, 206, 255)
);
line-height: 45px;
}
#smallbox2 {
margin-left: 12px;
}
li {
height: 25px;
}
p {
margin: 0 0 0 12px;
}
a {
color: black;
text-decoration: none;
font-size: 12px;
}
a:hover {
color: red;
}
li {
list-style: none;
}
ul {
padding-left: 0;
margin-top: 8px;
}
.c1 {
font-weight: 800;
}
</style>
</head>
<body>
<div id="bigbox">
<div id="smallbox1">
<p>京东快报</p>
</div>
<div id="smallbox2">
<ul>
<li>
<a href="#"
><span class="c1">[特惠] </span> 海飞丝去屑又去油 超清爽</a
>
</li>
<li>
<a href="#"
><span class="c1">[公告] </span> EBO 京东公益支持鲁甸新动作</a
>
</li>
<li>
<a href="#"><span class="c1">[特惠] </span> 4688元抢iPhone 6</a>
</li>
<li>
<a href="#"
><span class="c1">[公告] </span> 小米电视携豪礼高调入驻京东</a
>
</li>
</ul>
</div>
</div>
</body>
</html>
完成效果图:
4. 目标图:
完成代码:
<!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>Document</title>
<style>
div {
width: 260px;
height: 330px;
border: 2px solid black;
}
li {
list-style: none;
height: 32px;
line-height: 32px;
border-bottom: 1px dashed rgb(166, 163, 163);
}
ul {
margin: 0 0 0 0;
padding-left: 0;
}
a {
color: black;
text-decoration: none;
font-size: 12px;
}
p {
margin: 0 0 0 0;
padding-left: 10px;
color: white;
height: 35px;
background-color: rgb(233, 24, 90);
font-size: 13px;
line-height: 35px;
}
span {
display: inline-block;
width: 25px;
height: 25px;
border-radius: 50%;
color: white;
background-color: black;
line-height: 25px;
text-align: center;
margin-left: 5px;
}
a:hover {
color: red;
}
a:hover span {
background-color: red;
}
</style>
</head>
<body>
<div>
<p>大家都喜欢买的美容品</p>
<ul>
<li>
<a href="#"><span>1</span> 雅诗兰黛即时修护眼部精华霜15ml</a>
</li>
<li>
<a href="#"><span>2</span> 伊丽莎白雅顿显效复合活肤霜75ml</a>
</li>
<li>
<a href="#"><span>3</span> OLAY玉兰油多效修护霜50g</a>
</li>
<li>
<a href="#"><span>4</span> 巨型一号丝瓜水320ML</a>
</li>
<li>
<a href="#"><span>5</span> 情碧保湿洁肤水2200ml</a>
</li>
<li>
<a href="#"><span>6</span> 比度克细肤淡印霜30g</a>
</li>
<li>
<a href="#"><span>7</span> 兰芝(LANEIGE)夜间修护锁水面膜80ml</a>
</li>
<li>
<a href="#"><span>8</span> SK-II护肤精华露215ml</a>
</li>
<li>
<a href="#"><span>9</span> 欧莱雅青春密码活颜精华肌底液</a>
</li>
</ul>
</div>
</body>
</html>
完成效果图:
5. 目标图:
完成代码:
<!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>Document</title>
<style>
.bigbox {
width: 250px;
height: 270px;
border: 1px solid rgb(216, 216, 216);
border-radius: 10px 10px 10px 10px;
}
.smallbox {
background-image: -webkit-linear-gradient(
bottom,
rgb(248, 252, 255),
rgb(168, 222, 252)
);
}
li {
margin-left: 15px;
list-style: none;
width: 220px;
height: 30px;
border-bottom: 2px dashed rgb(157, 157, 157);
line-height: 30px;
}
ul {
padding-left: 0;
margin: 0 0 0 0;
}
a:hover {
color: red;
}
p {
border-radius: 9px 9px 0 0;
border-bottom: 2px solid white;
color: white;
height: 40px;
line-height: 40px;
margin: 0 0 0 0px;
padding-left: 15px;
background-image: -webkit-linear-gradient(
bottom,
rgb(158, 218, 251),
rgb(91, 193, 249)
);
}
a {
color: black;
text-decoration: none;
}
img {
vertical-align: middle;
}
</style>
</head>
<body>
<div class="bigbox">
<p><img src="./图片素材/bg.gif" alt="1" />中心开班信息</p>
<ul>
<div class="smallbox">
<li class="l1">
<a href="#"
><img src="./图片素材/特殊小箭头.png" alt="1" />
8月12日:学历+技能班</a
>
</li>
</div>
<li>
<a href="#"
><img src="./图片素材/小箭头.png" alt="1" /> 8月16日:高考特招班</a
>
</li>
<li>
<a href="#"
><img src="./图片素材/小箭头.png" alt="1" /> 8月23日:Java精英班</a
>
</li>
<li>
<a href="#"
><img src="./图片素材/小箭头.png" alt="1" />
8月31日:学士后强化班</a
>
</li>
<li>
<a href="#"
><img src="./图片素材/小箭头.png" alt="1" /> 9月5日:大学生就业班</a
>
</li>
<li>
<a href="#"
><img src="./图片素材/小箭头.png" alt="1" />
9月9日:企业定向委托班</a
>
</li>
<li>
<a href="#"
><img src="./图片素材/小箭头.png" alt="1" />
9月16日:网络营销强化班</a
>
</li>
</ul>
</div>
</body>
</html>
完成效果图:
6. 目标图:
完成代码:
<!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>Document</title>
<style>
div {
width: 340px;
height: 380px;
background-image: -webkit-linear-gradient(
bottom,
rgb(38, 140, 215),
rgb(62, 164, 236)
);
}
h1 {
color: white;
vertical-align: middle;
padding-left: 40px;
text-align: top;
}
h1 > img {
margin-top: 10px;
}
p {
padding-left: 35px;
color: white;
}
.p2 {
margin-left: 90px;
}
span {
color: red;
}
</style>
</head>
<body>
<div>
<h1>免费抢先体验 <img src="./图片素材/权威课程.png" alt="" /></h1>
<p><span>*</span>姓名: <input type="text" name="userName" /></p>
<p><span>*</span>邮箱: <input type="text" name="userName" /></p>
<p><span>*</span>电话: <input type="text" name="userName" /></p>
<p>
性别:
<select name="sex">
<option value="none">请选择</option>
<option value="male">男</option>
<option value="female">女</option>
<option value="no">不明</option>
</select>
</p>
<p>
年龄:
<select name="sex">
<option value="none">请选择</option>
<option value="male">0-18</option>
<option value="female">18-25</option>
<option value="no">35-60</option>
<option value="no">60-100</option>
</select>
</p>
<img src="./图片素材/btn.jpg" alt="1" class="p2" />
</div>
</body>
</html>
完成效果图: