手機報表展示是一種將數據可視化為圖表的形式,方便用戶快速查看和分析數據的方式。在手機報表展示中,CSS扮演著重要的角色,它能夠為網頁提供樣式和布局,使得報表更加清晰易懂。下面是一個簡單的CSS范例,用于為手機報表展示提供基本的樣式和布局。
```css
/* 定義頁面的布局和樣式 */
body {
margin: 0;
padding: 0;
font-family: Arial, sans-serif;
/* 定義頁面的寬度和高度 */
.container {
width: 800px;
margin: 0 auto;
padding: 20px;
background-color: #fff;
box-shadow: 0 0 10px rgba(0,0,0,0.2);
/* 定義導航欄和側邊欄的樣式 */
.nav {
background-color: #007bff;
padding: 20px;
.nav a {
color: #fff;
text-decoration: none;
display: inline-block;
margin-bottom: 10px;
.nav a:hover {
background-color: #0069d9;
/* 定義數據表的樣式 */
.data-table {
border-collapse: collapse;
width: 100%;
text-align: center;
/* 定義表格的樣式 */
.data-table thead {
text-align: left;
margin-bottom: 10px;
.data-table tbody {
text-align: center;
margin-bottom: 15px;
.data-table td {
padding: 10px;
border: 1px solid #ccc;
border-bottom: 1px solid #ccc;
.data-table th {
background-color: #007bff;
color: #fff;
text-align: left;
padding: 10px;
/* 定義標簽的樣式 */
.data-table tr td:first-child {
border-right: 1px solid #ccc;
.data-table tr td:last-child {
border-left: 1px solid #ccc;
/* 定義表頭和標題的樣式 */
.data-table thead th {
background-color: #007bff;
color: #fff;
text-align: center;
padding: 10px;
.data-table tbody th {
background-color: #007bff;
color: #fff;
text-align: center;
padding: 10px;
/* 定義數據條的樣式 */
.data-table tr td:nth-child(1) {
width: 100%;
background-color: #f0f0f0;
.data-table tr td:nth-child(2) {
width: 80%;
background-color: #e0e0e0;
.data-table tr td:nth-child(3) {
width: 60%;
background-color: #c0c0c0;
.data-table tr td:nth-child(4) {
width: 40%;
background-color: #b0b0b0;
.data-table tr td:nth-child(5) {
width: 30%;
background-color: #a0a0a0;
.data-table tr td:nth-child(6) {
width: 20%;
background-color: #808080;
.data-table tr td:nth-child(7) {
width: 10%;
background-color: #606060;
.data-table tr td:nth-child(8) {
width: 90%;
background-color: #404040;
.data-table tr td:nth-child(9) {
width: 10%;
background-color: #202020;
.data-table tr td:nth-child(10) {
width: 90%;
background-color: #002000;
.data-table tr td:nth-child(11) {
width: 10%;
background-color: #0000ff;
.data-table tr td:nth-child(12) {
width: 90%;
background-color: #000000;
.data-table tr td:nth-child(13) {
width: 10%;
background-color: #ff0000;
.data-table tr td:nth-child(14) {
width: 90%;
background-color: #ff0000;
.data-table tr td:nth-child(15) {
width: 10%;
background-color: #00ff00;
.data-table tr td:nth-child(16) {
width: 90%;
background-color: #0000ff;
.data-table tr td:nth-child(17) {
width: 10%;
background-color: #800000;
.data-table tr td:nth-child(18) {
width: 90%;
background-color: #800000;
.data-table tr td:nth-child(19) {
width: 10%;
background-color: #6000ff;
.data-table tr td:nth-child(20) {
width: 90%;
background-color: #6000ff;
.data-table tr td:nth-child(21) {
width: 10%;
background-color: #400000;
.data-table tr td:nth-child(22) {
width: 90%;
background-color: #400000;
.data-table tr td:nth-child(23) {
width: 10%;
background-color: #2000ff;
.data-table tr td:nth-child(24) {
width: 90%;
background-color: #2000ff;
.data-table tr td:nth-child(25) {
width: 10%;
background-color: #00ff80;
.data-table tr td:nth-child(26) {
width: 90%;
background-color: #00ff80;
.data-table tr td:nth-child(27) {
width: 10%;
background-color: #ff8000;
.data-table tr td:nth-child(28) {
width: 90%;
background-color: #ff8000;
.data-table tr td:nth-child(29) {
width: 10%;
background-color: #0000ff;
.data-table tr td:nth-child(30) {
width: 90%;
background-color: #0000ff;
.data-table tr td:nth-child(31) {
width: 10%;
background-color: #800000;
.data-table tr td:nth-child(32) {
width: 90%;
background-color: #800000;
.data-table tr td:nth-child(33) {
width: 10%;
background-color: #600000;
.data-table tr td:nth-child(34) {
width: 90%;
background-color: #600000;