CSS样式:
[css] view plaincopy
1.<style>
2.
3.body {
4.width: 600px;
5.margin: 40px auto;
6.font—family: ’trebuchet MS’, ’Lucida sans', Arial;
7.font-size: 14px;
8.color: #444;
9.}
10.
11.table {
12.*border-collapse: collapse; /* IE7 and lower */
13.border-spacing: 0;
14.width: 100%;
15.}
16.
17..bordered {
18.border: solid #ccc 1px;
19.—moz—border—radius: 6px;
20.-webkit-border—radius: 6px;
21.border-radius: 6px;
22.-webkit—box—shadow: 0 1px 1px #ccc;
23.-moz—box-shadow: 0 1px 1px #ccc;
24.box-shadow: 0 1px 1px #ccc;
25.}
26.
27.。bordered tr:hover {
28.background: #fbf8e9;
29.—o-transition: all 0.1s ease—in-out;
30.-webkit—transition: all 0.1s ease—in-out;
31.-moz—transition: all 0.1s ease—in-out;
32.—ms-transition: all 0。1s ease—in-out;
33.transition: all 0。1s ease-in-out;
34.}
35.
36.。bordered td, .bordered th {
37.border-left: 1px solid #ccc;
38.border-top: 1px solid #ccc;
39.padding: 10px;
40.text-align: left;
41.}
42.
43..bordered th {
44.background—color: #dce9f9;
45.background-image: —webkit-gradient(linear, left top, left bottom, from(#ebf3fc), to(#dce9f9));
46.background-image: —webkit—linear-gradient(top, #ebf3fc, #dce9f9);
47.background—image: -moz—linear—gradient(top, #ebf3fc, #dce9f9);
48.background-image: -ms-linear-gradient(top, #ebf3fc, #dce9f9);
49.background-image: -o-linear-gradient(top, #ebf3fc, #dce9f9);
50.background-image: linear-gradient(top, #ebf3fc, #dce9f9);
51.-webkit-box-shadow: 0 1px 0 rgba(255,255,255,。8) inset;
52.-moz—box—shadow:0 1px 0 rgba(255,255,255,。8) inset;
53.box—shadow: 0 1px 0 rgba(255,255,255,。8) inset;
54.border—top: none;
55.text—shadow: 0 1px 0 rgba(255,255,255,。5);
56.}
57.
58..bordered td:first—child, 。bordered th:first—child {
59.border-left: none;
60.}
61.
62.。bordered th:first—child {
63.—moz-border-radius: 6px 0 0 0;
64.—webkit—border-radius: 6px 0 0 0;
65.border—radius: 6px 0 0 0;
66.}
67.
68..bordered th:last-child {
69.-moz—border-radius: 0 6px 0 0;
70.—webkit-border-radius: 0 6px 0 0;
71.border—radius: 0 6px 0 0;
72.}
73.
74..bordered th:only-child{
75.—moz-border—radius: 6px 6px 0 0;
76.-webkit-border-radius: 6px 6px 0 0;
77.border—radius: 6px 6px 0 0;
78.}
79.
80..bordered tr:last-child td:first-child {
81.—moz—border-radius: 0 0 0 6px;
82.—webkit—border-radius: 0 0 0 6px;
83.border—radius: 0 0 0 6px;
84.}
85.
86..bordered tr:last—child td:last—child {
87.-moz—border—radius: 0 0 6px 0;
88.—webkit-border-radius: 0 0 6px 0;
89.border-radius: 0 0 6px 0;
90.}
91.
92./*-———--—--——-——---——---*/
93.
94.。zebra td, 。zebra th {
95.padding: 10px;
96.border-bottom: 1px solid #f2f2f2;
97.}
98.
99.。zebra tbody tr:nth-child(even) {
100.background: #f5f5f5;
101.—webkit—box-shadow: 0 1px 0 rgba(255,255,255,。8) inset;
102.—moz—box—shadow:0 1px 0 rgba(255,255,255,。8) inset;
103.box—shadow: 0 1px 0 rgba(255,255,255,.8) inset;
104.}
105.
106.。zebra th {
107.text-align: left;
108.text—shadow: 0 1px 0 rgba(255,255,255,。5);
109.border—bottom: 1px solid #ccc;
110.background—color: #eee;
111.background—image: -webkit-gradient(linear, left top, left bottom, from(#f5f5f5), to(#eee));
112.background—image: —webkit—linear—gradient(top, #f5f5f5, #eee);
113.background-image: —moz—linear-gradient(top, #f5f5f5, #eee);
114.background—image: -ms—linear—gradient(top, #f5f5f5, #eee);
115.background-image: -o—linear-gradient(top, #f5f5f5, #eee);
116.background-image: linear—gradient(top, #f5f5f5, #eee);
117.}
118.
119..zebra th:first-child {
120.-moz-border—radius: 6px 0 0 0;
121.—webkit—border—radius: 6px 0 0 0;
122.border-radius: 6px 0 0 0;
123.}
124.
125.。zebra th:last-child {
126.-moz—border-radius: 0 6px 0 0;
127.—webkit-border-radius: 0 6px 0 0;
128.border—radius: 0 6px 0 0;
129.}
130.
131.。zebra th:only—child{
132.-moz—border—radius: 6px 6px 0 0;
133.—webkit—border—radius: 6px 6px 0 0;
tabletable134.border—radius: 6px 6px 0 0;
135.}
136.
137.。zebra tfoot td {
138.border—bottom: 0;
139.border-top: 1px solid #fff;
140.background—color: #f1f1f1;
141.}
142.
143..zebra tfoot td:first-child {
144.-moz-border-radius: 0 0 0 6px;
145.—webkit—border—radius: 0 0 0 6px;
146.border—radius: 0 0 0 6px;
147.}
148.
149.。zebra tfoot td:last—child {
150.-moz-border—radius: 0 0 6px 0;
151.—webkit-border—radius: 0 0 6px 0;
152.border—radius: 0 0 6px 0;
153.}
154.
155..zebra tfoot td:only—child{
156.-moz—border-radius: 0 0 6px 6px;
157.—webkit-border—radius: 0 0 6px 6px
158.border—radius: 0 0 6px 6px
159.}
160.
161.</style〉
HTML:
[html] view plaincopy
版权声明:本站内容均来自互联网,仅供演示用,请勿用于商业和其他非法用途。如果侵犯了您的权益请与我们联系QQ:729038198,我们将在24小时内删除。
发表评论