0
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

More than 5 years have passed since last update.

CSS 表格樣式 - 詳細使用介紹 By 彭彭

Last updated at Posted at 2018-08-13

★ css 表格樣式 詳細介紹

qiita.rb
<DOCTYPE html>
<html>
<head>
<meta charset="utf-8"></meta>
<title>CSS 表格樣式</title>
<style type="text/css">
body{
	background-color:#708090;
}
table{
	width:300px;border:1px solid #ffffff;
	border-collapse:collapse;
}
td{
	border-bottom:1px solid #888888;padding:2px;
}
/* 表格中的第一對 tr */
tr:nth-child(1){
	background-color:#ffffff;color:#000000;
}
/* 表格中的第偶數對 tr */
tr:nth-child(even){
	background-color:#ffeeff;
}
</style>
</head>
<body>
	<table>
		<tr>
			<td></td>
			<td>少</td>
			<td></td>
		</tr>
		<tr>
			<td></td>
			<td>寶</td>
			<td></td>
		</tr>
		
	</table>
	<hr />
	<img src="florence.jpg" />
</body>
</html>
0
0
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
0
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?