寒假提升 | Day7 CSS 第五部分 #637
Replies: 5 comments 2 replies
-
今日打卡 # Day07 作业布置
## 一. 完成课堂所有的代码
## 二. 自己查一个列表并且完成
## 三. 完成table的作业内容
![作业](https://tva1.sinaimg.cn/large/e6c9d24egy1h0vps9hqn6j21cb0j0di4.jpg)
图片见下方
## 四. 说出表单元素什么情况下使用 `name` 和 `value` ?
## 五. 说出form提交时的属性作用
* action
* method
* target |
Beta Was this translation helpful? Give feedback.
-
Day07 作业布置一. 完成课堂所有的代码二. 自己查一个列表并且完成<!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>
<link rel="stylesheet" href="./css/reset.css">
<!--
1->先完成结构
2->重置样式(body/a/ul)
3->先整体,后局部
*顺序从外往里,从上往下
4->去除重复的代码(css)
* 将重复的代码放到一个单独的class中
* 不同的代码放到不同的class中
-->
<style>
ul > li {
margin-top: 15px;
}
ul > li > a{
text-decoration: none;
color: #333;
font-weight: 400;
}
ul > li > a:hover{
color: #f00;
}
/* 局部 */
ul > li > .renking{
display: inline-block;
width: 24px;
height: 24px;
margin-right: 2px;
text-align: center;
line-height: 24px;
font-weight: 700;
color: #999;
}
ul > li .icon{
position: relative;
top: 3px;
left: 10px;
display: inline-block;
width: 16px;
height: 16px;
text-align: center;
}
ul > li .new{
background-image: url(../图片资源/new.svg);
}
ul > li .hot{
background-image: url(../图片资源/hot.svg);
}
/* 伪类:结构伪类 */
ul > li:nth-child(1) .renking{
color: #f00;
}
ul > li:nth-child(2) .renking{
color: #00f;
}
ul > li:nth-child(3) .renking{
color: #0f0;
}
</style>
</head>
<body>
<ul>
<li class="item">
<span class="renking">1</span>
<a class="content" href="#">打疫苗不如感染新冠疫苗?官方回应</a>
<i class="icon new"></i>
</li>
<li class="item">
<span class="renking">2</span>
<a class="content" href="#">这是感染了放屁株吗?</a>
<i class="icon hot"></i>
</li>
<li class="item">
<span class="renking">3</span>
<a class="content" href="#">打疫苗不如感染新冠疫苗?官方回应</a>
<i class="icon"></i>
</li>
<li class="item">
<span class="renking">4</span>
<a class="content" href="#">官方:抗原可能出现假阴假阳</a>
<i class="icon new"></i>
</li>
<li class="item">
<span class="renking">5</span>
<a class="content" href="#">调毒株产生抗体靠谱吗?砖家解答</a>
<i class="icon hot"></i>
</li>
<li class="item">
<span class="renking">6</span>
<a class="content" href="#">这是一条新闻</a>
<i class="icon"></i>
</li>
<li class="item">
<span class="renking">7</span>
<a class="content" href="#">这也是一条新闻</a>
<i class="icon"></i>
</li>
</ul>
</body>
</html> 三. 完成table的作业内容<!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>
a.item1{
display: inline-block;
width: 100px;
height: 28px;
text-decoration: none;
color: #fff;
background-color: #f00;
border-radius: 8px
}
table{
text-align: center;
border-collapse: collapse;
}
td{
width: 200px;
height: 36px;
padding: 20px;
}
.album1{
background-color: #008c8c;
font-size: 20px;
}
.album2{
background-color: #316255;
}
div{
color: #999;
}
</style>
</head>
<body>
<table>
<tr class="album1">
<td>放映时间</td>
<td>语言版本</td>
<td>放映厅</td>
<td>售价(元)</td>
<td>选座购票</td>
</tr>
<tr class="album2">
<td rowspan="2">13:15
<div class="content">15:00散场</div>
</td>
<td rowspan="2">国语3D</td>
<td rowspan="2">2号厅</td>
<td rowspan="2">¥48.5</td>
<td rowspan="2">
<a class="item1" href="#">选座购票</a>
</td>
</tr>
<tr>
</tr>
<tr class="album1">
<td rowspan="2">13:15
<div class="content">15:00散场</div>
</td>
<td rowspan="2">国语3D</td>
<td rowspan="2">2号厅</td>
<td rowspan="2">¥48.5</td>
<td rowspan="2">
<a class="item1" href="#">选座购票</a>
</td>
</tr>
<tr>
</tr>
<tr class="album2">
<td rowspan="2">13:15
<div class="content">15:00散场</div>
</td>
<td rowspan="2">国语3D</td>
<td rowspan="2">2号厅</td>
<td rowspan="2">¥48.5</td>
<td rowspan="2">
<a class="item1" href="#">选座购票</a>
</td>
</tr>
<tr>
</tr>
<tr class="album1">
<td rowspan="2">13:15
<div class="content">15:00散场</div>
</td>
<td rowspan="2">国语3D</td>
<td rowspan="2">2号厅</td>
<td rowspan="2">¥48.5</td>
<td rowspan="2">
<a class="item1" href="#">选座购票</a>
</td>
<tr>
</tr>
<tr class="album2">
<td rowspan="2">13:15
<div class="content">15:00散场</div>
</td>
<td rowspan="2">国语3D</td>
<td rowspan="2">2号厅</td>
<td rowspan="2">¥48.5</td>
<td rowspan="2">
<a class="item1" href="#">选座购票</a>
</td>
</tr>
<tr>
</tr>
</table>
</body>
</html> 四. 说出表单元素什么情况下使用name和value?
五. 说出form提交时的属性作用
|
Beta Was this translation helpful? Give feedback.
-
Day07 作业布置一. 完成课堂所有的代码《水平居中总结》 <style> .box{ background-color:#f00; } .box span{ background:#0f0; } .container{ background:#00f; width:100px; height:100px; } <style> 《认识列表元素》 <style> ul>li>a{ display:inline-block; } </style>ul>li .content{ display:inline; } ul>li .icon{ display:inline-block; weight:16px; height:16px; blackground-image:...} 三. 完成table的作业内容<style> p{ margin:0px; padding:0px; } table{ text-align:center; border-collapse:collpse; } table tr:nth-child(1)td{ pdding:10px 0; font-size:24px; fonnt-weight:700; } table tr:nth-of-type(2n+2){ background-color:rgb(239,219,223); } table tr-of-type(2n+3){ background-color:rgb(235,183,193); } table tr:nth-child(2) { font-weight: 700; } table tr:nth-child(n + 3) td:nth-of-type(4) { color: red; } table td > input { padding: 10px; font-size: 14px; color: #fff; background-color: rgb(240, 72, 72); border-radius: 13px; border: 0; } td { width: 140px; height: 60px; } </style>
四. 说出表单元素什么情况下使用name和value?
五. 说出form提交时的属性作用
|
Beta Was this translation helpful? Give feedback.
-
二.自己查一个列表并且完成<!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>
table{
text-align: center;
border-collapse: collapse;
}
table tr:first-child{
font-weight:700;
font-size:24px;
}
table tr:first-child td {
padding: 20px 0;
}
td {
width: 140px;
height: 30px;
}
table tr:nth-child(n + 3) {
background-color: rgb(222, 225, 226);
}
table tr:nth-child(2n) {
background-color: rgb(141, 155, 165);
}
table tr:nth-child(2) {
color: #fff;
background-color: rgb(38, 145, 221);
}
</style>
</head>
<body>
<table>
<tr>
<td colspan="6">场内股票ETF涨幅榜</td>
</tr>
<tr>
<td>序</td>
<td>代码</td>
<td>基金场内简称</td>
<td>涨跌幅(%)</td>
<td>场内申赎份额</td>
<td>成交额(万元)</td>
</tr>
<tr>
<td>1</td>
<td>517960.SH</td>
<td>AHETF</td>
<td>5.81</td>
<td>0</td>
<td>680</td>
</tr>
<tr>
<td>2</td>
<td>517960.SH</td>
<td>AHETF</td>
<td>5.81</td>
<td>0</td>
<td>680</td>
</tr>
<tr>
<td>3</td>
<td>517960.SH</td>
<td>AHETF</td>
<td>5.81</td>
<td>0</td>
<td>680</td>
</tr>
<tr>
<td>4</td>
<td>517960.SH</td>
<td>AHETF</td>
<td>5.81</td>
<td>0</td>
<td>680</td>
</tr>
<tr>
<td>5</td>
<td>517960.SH</td>
<td>AHETF</td>
<td>5.81</td>
<td>0</td>
<td>680</td>
</tr>
</table>
</body>
</html> 三.完成table的作业内容<!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>
p {
margin: 0;
padding: 0;
}
table {
text-align: center;
border-collapse: collapse;
}
table tr:nth-child(1) td {
padding: 10px 0;
font-size: 24px;
font-weight: 700;
}
table tr:nth-of-type(2n + 2) {
background-color: rgb(239, 219, 223);
}
table tr:nth-of-type(2n + 3) {
background-color: rgb(235, 183, 193);
}
table tr:nth-child(2) {
font-weight: 700;
}
table tr:nth-child(n + 3) td:nth-of-type(4) {
color: red;
}
table td > input {
padding: 10px;
font-size: 14px;
color: #fff;
background-color: rgb(240, 72, 72);
border-radius: 13px;
border: 0;
}
td {
width: 140px;
height: 60px;
}
</style>
</head>
<body>
<table>
<tr>
<td colspan="5">影院电影放映列表</td>
</tr>
<tr>
<td>放映时间</td>
<td>语言版本</td>
<td>放映厅</td>
<td>售价(元)</td>
<td>选座购票</td>
</tr>
<tr>
<td>
<p>13:15</p>
<p>15:00散场</p>
</td>
<td>国语三D</td>
<td>2号厅</td>
<td class="price">¥48.5</td>
<td>
<input type="button" value="选座购票" />
</td>
</tr>
<tr>
<td>
<p>13:15</p>
<p>15:00散场</p>
</td>
<td>国语三D</td>
<td>2号厅</td>
<td>¥48.5</td>
<td>
<input type="button" value="选座购票" />
</td>
</tr>
<tr>
<td>
<p>13:15</p>
<p>15:00散场</p>
</td>
<td>国语三D</td>
<td>2号厅</td>
<td>¥48.5</td>
<td>
<input type="button" value="选座购票" />
</td>
</tr>
<tr>
<td>
<p>13:15</p>
<p>15:00散场</p>
</td>
<td>国语三D</td>
<td>2号厅</td>
<td>¥48.5</td>
<td>
<input type="button" value="选座购票" />
</td>
</tr>
<tr>
<td>
<p>13:15</p>
<p>15:00散场</p>
</td>
<td>国语三D</td>
<td>2号厅</td>
<td>¥48.5</td>
<td>
<input type="button" value="选座购票" />
</td>
</tr>
</table>
</body>
</html> 四。说出表单元素什么情况下使用 name 和 value?
五。说出 form 提交时的属性作用
|
Beta Was this translation helpful? Give feedback.
-
一. 完成课堂所有的代码二. 自己查一个列表并且完成
三. 完成table的作业内容
四. 说出表单元素什么情况下使用name和value?name 用于指定表单的名称,而表单控件中具有name属性的元素会将用户填写的内容提交给服务器(在定义单选按钮时,必须为同一组中的选项指定相同的name值,这样“单选”才会生效)。 value 是input控件中的默认文本值 五. 说出form提交时的属性作用
用于指定接受并处理表单数据的服务器程序的url地址
用于设置表单数据的提交方式,其取值为post或get
用于选择在当前页面跳转还是新开页面跳转
|
Beta Was this translation helpful? Give feedback.
-
寒假提升 | Day7 CSS 第五部分
Coding Blog
https://icodeq.com/2022/2da58fb3ae43/
Beta Was this translation helpful? Give feedback.
All reactions