实现商品列表
html
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<title>商品列表图片</title>
<style>
.row > img {
width: 15%;
}
</style>
</head>
<body>
<div class="row">
<img src="image/00001.jpg" alt="">
<img src="image/00002.jpg" alt="">
<img src="image/00003.jpg" alt="">
<img src="image/00004.jpg" alt="">
<img src="image/00005.jpg" alt="">
<img src="image/00006.jpg" alt="">
</div>
<div class="row">
<img src="image/00007.jpg" alt="">
<img src="image/00008.jpg" alt="">
<img src="image/00009.jpg" alt="">
<img src="image/00010.jpg" alt="">
<img src="image/00011.jpg" alt="">
<img src="image/00012.jpg" alt="">
</div>
</body>
</html>
实现排行榜效果
html
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<title>排行榜</title>
<style>
#rank-list td {
font-size: 1.1em;
padding-top: 3px;
padding-bottom: 3px;
}
a {
text-decoration: none;
color: blue;
}
.num > span{
color: darkgray;
}
.boil {
background-color: red;
color: white;
border-radius: 5px;
font-size: 0.85em;
padding: 1px 2px 1px 2px;
}
.hot {
background-color: coral;
color: white;
border-radius: 5px;
font-size: 0.85em;
padding: 1px 2px 1px 2px;
}
.new {
background-color: orange;
color: white;
border-radius: 5px;
font-size: 0.85em;
padding: 1px 2px 1px 2px;
}
</style>
</head>
<body>
<div class="container">
<table id="rank-list">
<tr>
<td><span><img src="image/top-one.png" alt="" width="20px"></span></td>
<td><a href="#">中国空间站第三棒全力开跑</a></td>
</tr>
<tr>
<td class="num"><span style="color: red;">1</span></td>
<td><a href="#">#2022高考作文来了# <span class="boil">沸</span></a></td>
</tr>
<tr>
<td class="num"><span style="color: coral;">2</span></td>
<td><a href="#">深圳回应"50辆宾利堵车位"纠纷 <span class="hot">热</span></a></td>
</tr>
<tr>
<td class="num"><span style="color: orange;">3</span></td>
<td><a href="#">回头看高考青春永不老 <span class="hot">热</span></a></td>
</tr>
<tr>
<td class="num"><span>4</span></td>
<td><a href="#">不出意外今年高考又出现了这些意外</a></td>
</tr>
<tr>
<td class="num"><span>5</span></td>
<td><a href="#">考生忘带准考证家长又送错考场 <span class="new">新</span></a></td>
</tr>
<tr>
<td class="num"><span>6</span></td>
<td><a href="#">苹果用3分钟正式宣战新行业</a></td>
</tr>
<tr>
<td class="num"><span>7</span></td>
<td><a href="#">5名考生"组团"跑错考点交警转送 <span class="new">新</span></a></td>
</tr>
<tr>
<td class="num"><span>8</span></td>
<td><a href="#">俄罗斯卢布如何做到"惊天逆转" <span class="new">新</span></a></td>
</tr>
<tr>
<td class="num"><span>9</span></td>
<td><a href="#">美国最大水库因干涸发现多具藏尸</td>
</tr>
<tr>
<td class="num"><span>10</span></td>
<td><a href="#">60秒看各地家长花式送考</td>
</tr>
</table>
</div>
</body>
</html>
实现棋盘效果
html
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<title>作业2591实现棋盘效果</title>
<style>
.container {
width: 600px;
height: 600px;
border: 5px solid black;
margin: auto;
display: flex;
}
.black {
background-color: black;
width: 200px;
height: 200px;
}
.white {
background-color: white;
width: 200px;
height: 200px;
}
</style>
</head>
<body>
<div class="container">
<div>
<div class="black"></div>
<div class="white"></div>
<div class="black"></div>
</div>
<div>
<div class="white"></div>
<div class="black"></div>
<div class="white"></div>
</div>
<div>
<div class="black"></div>
<div class="white"></div>
<div class="black"></div>
</div>
</div>
</body>
</html>
电话按键
html
<table width="400px" border="1px" cellspacing=0>
<tr class="one">
<td>1</td>
<td>2</td>
<td>3</td>
</tr>
<tr class="two">
<td>4</td>
<td>5</td>
<td>6</td>
</tr>
<tr class="three">
<td>7</td>
<td>8</td>
<td>9</td>
</tr>
</table>
<style>
table, td {
text-align: center;
}
.one {
color:red;
text-decoration: underline;
}
.two {
color: green;
text-decoration: line-through;
}
.three {
color: blue;
font-weight: 900;
}
</style>