-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathcssDemo.html
224 lines (220 loc) · 4.81 KB
/
cssDemo.html
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
<!DOCTYPE html>
<html>
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1">
<title>CSS DEMO</title>
</head>
<body>
<style>
a {
text-decoration: none;
color: #333;
outline: none;
}
a img {
border: none;
}
html, body {
height: 100%;
}
body {
font-family: Georgia, serif;
background: #F7F7F7;
padding-left: 20px;
padding-right: 20px;
}
.wrapper {
width: 100%;
max-width: 700px;
margin: 50px auto;
counter-reset: listLi;
}
.wrapper ul {
list-style-type: none;
margin: 0;
padding-left: 0;
}
.wrapper ul li {
list-style-type: none;
margin: 0 0 20px 0;
position: relative;
box-shadow: 0 0 1px rgba(0, 0, 0, 0.3);
font-size: 15px;
border-radius: 3px;
overflow: hidden;
color: #333;
transition: all 0.2s;
background: #FFF;
transform: translateZ(0);
will-change: inherit;
counter-increment: listLi;
}
.wrapper ul li::after {
list-style-type: none;
margin: 0;
content: counter(listLi);
position: absolute;
right: 18px;
top: -1px;
background: #6CBCCA;
box-shadow: 0 0 1px rgba(0, 0, 0, 0.8), 0px 1px 0px rgba(0, 0, 0, 0.3);
color: #FFF;
font-size: 19px;
padding: 3px 6px;
transition: background 0.3s;
}
.wrapper ul li:hover {
list-style-type: none;
transition: all 0.2s;
transform: scale(1.05);
}
.wrapper ul li:hover::after {
background: #5595A0;
transition: background 0.3s;
}
.wrapper ul li img {
float: left;
height: 150px;
width: 150px;
text-align: center;
line-height: 150px;
text-shadow: 1px 1px 1px #CCC;
}
.wrapper ul li div {
padding: 20px 20px 10px 170px;
}
.wrapper ul li div h2 {
margin-top: 0;
font-size: 26px;
margin-bottom: 12px;
}
.wrapper ul li div p {
margin: 0;
font-weight: lighter;
line-height: 30px;
}
.title {
text-align: center;
margin-bottom: 40px;
}
.title h1 {
line-height: 50px;
margin: 0;
}
.title p {
margin: 15px 0;
}
.title .info {
margin: 15px 0;
}
.title .btn {
display: inline-block;
background-color: #6CBCCA;
color: #fff;
border: 1px solid #ccc;
padding: 10px 24px;
border-radius: 4px;
margin: 10px;
transition: all 0.3s;
}
.title .btn:hover {
background-color: #5595A0;
transition: all 0.3s;
}
@media screen and (max-width: 641px) {
.wrapper ul li::after {
left: 10px;
right: auto;
}
.wrapper ul li img {
width: 120px;
height: 120px;
}
.wrapper ul li div {
padding-left: 135px;
}
.wrapper ul li div h2 {
font-size: 18px;
}
.wrapper ul li div p {
font-size: 14px;
line-height: 20px;
}
.title p span {
display: none;
}
}
@media screen and (max-width: 341px) {
.wrapper ul li::after {
left: 10px;
right: auto;
}
.wrapper ul li img {
width: 80px;
height: 80px;
}
.wrapper ul li div {
padding-left: 95px;
}
.wrapper ul li div h2 {
font-size: 18px;
height: 21px;
overflow: hidden;
}
.wrapper ul li div p {
font-size: 14px;
line-height: 20px;
}
.title p span {
display: none;
}
}
</style>
<div class="wrapper">
<div class="title">
<h1>页面示例</h1>
<p>效果还不错,先写下来,以后利用下,简约风格,不失设计</p>
<p class="info"><a href="https://github.com/barretlee" target="_blank" class="btn">踩点小胡子哥的github</a> <span>or</span> <a href="http://barretlee.com/rss2.xml" target="_blank" class="btn">订阅小胡子哥的博客</a></p>
</div>
<ul>
<li>
<a href="http://zhangmengxue.com" target="_blank">
<img src="http://barretlee.com/skylar.jpg" alt="张梦雪">
<div>
<h2>大额大额傻傻等天亮</h2>
<p>傻大额,大额,大额,大额头,额头大,啊哈哈,waiting for sunrise.</p>
</div>
</a>
</li>
<li>
<a href="http://barretlee.com" target="_blank">
<img src="http://barretlee.com/avatar.png" alt="小胡子哥">
<div>
<h2>小胡子哥的个人博客</h2>
<p>分享生活,分享技术,小胡子哥带你走进大前端!读书、上网、旅行、睡觉、烧菜、懒,样样在行!</p>
</div>
</a>
</li>
<li>
<a href="http://zhangmengxue.com" target="_blank">
<img src="http://barretlee.com/skylar.jpg" alt="张梦雪">
<div>
<h2>大额大额傻傻等天亮</h2>
<p>傻大额,大额,大额,大额头,额头大,啊哈哈,waiting for sunrise.</p>
</div>
</a>
</li>
<li>
<a href="http://barretlee.com" target="_blank">
<img src="http://barretlee.com/avatar.png" alt="小胡子哥">
<div>
<h2>小胡子哥的个人博客</h2>
<p>分享生活,分享技术,小胡子哥带你走进大前端!读书、上网、旅行、睡觉、烧菜、懒,样样在行!</p>
</div>
</a>
</li>
</ul>
</div>
</body>
</html>