选中变色没有覆盖整个DIV,a标签那里出问题,整文字没有居中了

选中变色没有覆盖整个DIV,a标签那里出问题,整文字没有居中了

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
<!DOCTYPE html>
<html>
<head>
<meta charset="UTF-8">
<title>城市医院预约平台 - 按医院挂号</title>
<link rel="stylesheet" type="text/css" href="css/layout.css">
<link rel="stylesheet" type="text/css" href="css/base.css">
<link rel="stylesheet" type="text/css" href="css/hospital.css">
<link rel="stylesheet" type="text/css" href="css/ui.css">\
<script type="text/javascript" src="js/jquery-1.7.1.min.js"></script>
</head>
<body>
<!-- 顶部top -->
<div id="top" class="top">
 
<div class="wrap">
<p class="call">010-114/116114</p>
<p class="wellcome">欢迎来到城市医院预约挂号统一平台 
请&nbsp;
<a href="#">登录</a>
<a href="#">注册</a>&nbsp;&nbsp;&nbsp;&nbsp;
<a href="#">帮助中心
</p>
</div>
</div>
 
<div id="header" class="header">
 
<div class="wrap clearfix">
<a href="#" class="logo"><img src="img/logo.png"></a>
 
<div class="search ui-search">
<div class="ui-search-selected">医院</div>、
<div class="ui-search-selected-list">
 
<a href="#1">科室</a>
<a href="#1">疾病</a>
<a href="#1">医院</a>
 
</div>
<input type="text" name="search-content" class="ui-search-input" placeholder="请输入搜索内容">
<a href="#" class="ui-search-submit">&nbsp;</a>
</div>
</div>
</div>
 
<div id="nav" class="nav">
<div class="wrap">
 
<a href="index.html" class="link">首页</a>
<a href="hospital.html" class="link link_focus">按医院挂号</a>
<a href="#" class="link">按科室挂号</a>
<a href="#" class="link">按疾病挂号</a>
<a href="#" class="link">最新公告</a>
<a href="#" class="link right">社会知名医院</a>
</div>
</div>
 
<div id="filter" class="filter">
<div class="group">
<div class="caption">医院类型
 
<a href="#" class="condition">全部</a>
<a href="#" class="condition">北京区县属医院</a>
<a href="#" class="condition">其他</a>
</div>
<div class="caption">医院等级
 
<a href="#" class="condition">全部</a>
<a href="#" class="condition">三级甲等</a>
<a href="#" class="condition">三级合格</a>
</div>
<div class="caption">医院位置
 
<a href="#" class="condition">全部</a>
<a href="#" class="condition">朝阳区</a>
<a href="#" class="condition">西城区</a>
<a href="#" class="condition">海淀区</a>
<a href="#" class="condition">丰台区</a>
<a href="#" class="condition">顺义区</a>
<a href="#" class="condition">通州区</a>
 
</div>
</div>
</div>
 
<script type="text/template" id="template_datalist_ite">
 
<div class="item">
<div class="cover"><img src="{imgUrl}" alt="医院a" /></div>
<div class="name">
{name}
<span class="level">{level}</span>
</div>
<div class="time">放号时间 {time}</div>
<div class="phone">电话:{phone}</div>
<div class="address">地址:{address}</div>
<a  class="button" href="#">&nbsp;</a>
</div>
 
</script>
 
<div id="datalist" class="datalist wrap">
 
<div class="item">
<div class="cover"><img src="img/hospital-1.jpg" alt="医院a" /></div>
<div class="name">
首都医科大学附属北京同仁医院
<span class="level">三级甲等</span>
</div>
<div class="time">放号时间 8:30</div>
<div class="phone">电话:010-1234567</div>
<div class="address">地址:北京市东城区东交民巷1号(西区)</div>
<a  class="button" href="#">&nbsp;</a>
</div>
 
<div class="item">
<div class="cover"><img src="img/hospital-1.jpg" alt="医院a" /></div>
<div class="name">
首都医科大学附属北京同仁医院
<span class="level">三级甲等</span>
</div>
<div class="time">放号时间 8:30</div>
<div class="phone">电话:010-1234567</div>
<div class="address">地址:北京市东城区东交民巷1号(西区)</div>
<a  class="button" href="#">&nbsp;</a>
</div>
<div class="item">
<div class="cover"><img src="img/hospital-1.jpg" alt="医院a" /></div>
<div class="name">
首都医科大学附属北京同仁医院
<span class="level">三级甲等</span>
</div>
<div class="time">放号时间 8:30</div>
<div class="phone">电话:010-1234567</div>
<div class="address">地址:北京市东城区东交民巷1号(西区)</div>
<a  class="button" href="#">&nbsp;</a>
</div>
 
 
</div>
 
<div id="pagination" class="pagination wrap">
<a href="#0" class="item item_text item_first">首页</a>
 
<a href="#0" class="item item_icon item_prev">&nbsp;</a>
 
<span class="page_wrap">
<a href="#1" class="item item_prev"><img src="img/icon-pagination-arrow.png"></a>
<a href="#1" class="item item_page">1</a>
<a href="#1" class="item item_page item_page_focus">2</a>
<a href="#1" class="item item_page">3</a>
<a href="#1" class="item item_next"><img src="icon-pagination-arrow.png"></a>
</span>
 
<a href="#0" class="item item_icon item_next">&nbsp;</a>
 
<a href="#0" class="item item_text item_last">尾页</a>
 
<a href="#0" class="item item_count">共计3页</a>
<span href="#0" class="item item_text">到
<input type="text" class="input_page" name="input_page" />
<input type="button" class="input_submit" value="" />
</span>
 
</div>
 
<div id="footer" class="footer">Copyright @ 2017慕课网版权所有</div>
 
<script type="text/javascript" src="js/ui.js"></script>
<script type="text/javascript" src="js/data.js"></script>
</body>
</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
layout.css
*{
    margin0;
    padding0;
}
 
.clearfix:after{
    content' ';
    displayblock;
    height0;
    line-height0;
    clearboth;
    zoom: 1;
}
 
.wrap{
    width1000px;
    margin0 auto;
    positionrelative;
}
 
.top{
    height30px;
    background-color#f5f5f5;
}
 
.header{
    height92px;
}
 
.nav{
    height36px;
    background-color#60bff2;
}
 
.banner{
    width802px;
    margin0 auto;
    height414px;
    padding9px 0 0 198px;
}
.banner-slider{
    floatleft;
    width544px;
    height414px;
    background-color#8edff3;
}
.banner-search{
    floatright;
    width250px;
    height255px;
    background-color#eee;
}
.banner-help{
    floatright;
    width250px;
    height146px;
    background-color#ccc;
    margin-top12px;
}
 
.content{
    padding10px 0 38px 0;
}
.content-tab{
    floatleft;
    width742px;
    height490px;
    background-color#eee;
}
 
.content-news,
.content-close{
    floatright;
    width248px;
    height236px;
    border1px solid #ccc;
}
.content-close{
    margin-top12px;
    border-colorred;
}
 
.footer{
    height70px;
    padding25px 0;
    background-color#eceef2;
}
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
225
226
227
228
229
230
231
232
233
234
235
236
ui.css
/* 搜索 */
.ui-search{
    backgroundurl(../img/ui-search.jpg) center no-repeat;
    font-size14px;
    color#fff;
    positionrelative;
}
.ui-search-selected{
    width70px;
    height38px;
    line-height38px;
    positionabsolute;
    left0;
    top0;
    text-indent14px;
}
.ui-search-selected-list{
    displaynone;
    positionabsolute;
    width67px;
    height24px;
    line-height24px;
    box-shadow: 3px 3px 5px rgba(0,0,0,.2);
    left2px;
    top36px;
    z-index2;
}
.ui-search-selected-list a{
    displayblock;
    color#A5a2a2;
    text-aligncenter;
    background-color#fff;
}
.ui-search-selected-list a:hover{
    background-color#ebeef5;
}
.ui-search-input{
    width208px;
    height36px;
    positionabsolute;
    left73px;
    top1px;
    line-height36px;
    font-size13px;
    color#A5a2a2;
}
.ui-search-submit{
    displayblock;
    positionabsolute;
    right0;
    top1px;
    width40px;
    height36px;
}
 
/* ui-menu 分类菜单 */
.ui-menu-item{
    height22px;
    line-height22px;
    padding8px 5px 9px 6px;
    margin-left2px;
}
.ui-menu-item:hover{
    background-color#fff;
}
.ui-menu-item-department{
    floatleft;
    height22px;
    line-height22px;
    positionrelative;
    padding-left30px;
    font-size14px;
}
.ui-menu-item-department:before{
    content:' ';
    displayblock;
    width22px;
    height21px;
    positionabsolute;
    left0;
    top1px;
    backgroundurl(../img/icon-menu.jpg) -22px 0 no-repeat;
 
}
.ui-menu-item:nth-child(2) .ui-menu-item-department:before{
    background-position-y: -22px
}
.ui-menu-item:nth-child(3) .ui-menu-item-department:before{
    background-position-y: -44px
}
.ui-menu-item-disease{
    font-size12px;
    floatright;
    padding-left5px;
    color#d7f3ff;
}
.ui-menu-item:hover .ui-menu-item-department:before{
    background-position-x: 0
}
.ui-menu-item:hover .ui-menu-item-department{
    color#333;
}
.ui-menu-item:hover .ui-menu-item-disease{
    color#868686;
}
.ui-menu-item:hover .ui-menu-item-detail{
    displayblock;
}
.ui-menu-item-detail{
    displaynone
    positionabsolute;
    width500px;
    height393px;
    padding20px 10px 10px 29px;
    backgroundurl(../img/bg-menu.jpg) center no-repeat;
    top0;
    left190px;
    background-color#fff;
    box-shadow: 5px 5px 2px rgba(0,0,0,.1);
}
.ui-menu-item-detail-group{
    padding-bottom20px;
    text-alignleft;
}
.ui-menu-item-detail-group-caption{
    width100%;
    displayblock;
    height34px;
    line-height34px;
    color#666;
    font-size16px;
    font-weightbold;
}
.ui-menu-item-detail-group-list{
    line-height23px;
}
.ui-menu-item-detail-group-list a{
    display: inline-block;
    color#868686;
    margin-right8px;
    font-size12px;
    padding-bottom5px;
}
 
.ui-menu-item-detail-group-list a:after{
    content' |';
    color#ddd;
    padding-left8px;
}
 
/* 回到顶部 */
.ui-backTop{
    displaynone;
    positionfixed;
    right2px;
    bottom2px;
    z-index9;
    width40px;
    height40px;
    color#fff;
    background: rgba(102,102,102,.9url(../img/icon-go-up.png) center no-repeat;
}
.ui-backTop:hover{
    background: rgba(102,102,102,.9);
}
 
.ui-backTop:hover:after{
    content'回到顶部';
    displayblock;
    line-height20px;
    text-aligncenter;
}
 
/* ui-slider 幻灯片组件 */
.ui-slider{
    width544px;
    height414px;
    positionrelative;
    overflowhidden;
}
.ui-slider-wrap{
    width99999px;
    height414px;
    positionabsolute;
    left0;
    right0;
    transition: all .5s;
}
.ui-slider-wrap .item{
    displayblock;
    floatleft;
    width544px;
    height414px;
}
.ui-slider-arrow{
    width544px;
    height40px;
    top50%;
    margin-top-20px;
    positionabsolute;
}
.ui-slider-arrow .item{
    displayblock;
    width40px;
    height40px;
    top0;
    backgroundurl(../img/ui-slider-arrow.png) no-repeat;
    positionabsolute;
}
.ui-slider-arrow .left{
    left0;
}
.ui-slider-arrow .right{
    right0;
    background-position-40px 0;
}
.ui-slider-process{
    width544px;
    height12px;
    text-aligncenter;
    left0;
    bottom20px;
    positionabsolute;
}
.ui-slider-process .item{
    display: inline-block;
    width16px;
    height16px;
    background-color#eee;
    border-radius: 50%;
}
.ui-slider-process .item_focus,
.ui-slider-process .item:hover{
    background-color#1fa4f0;
}
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
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
base.css
p{
    margin0;
    padding0;
    display: inline-block;
}
 
a{
    text-decorationnone;
}
select,input{
    bordernone;
    outlinenone;
}
 
/* #top */
.top{
    line-height30px;
    font-size13px;
    color#868686;
}
 
.top .call{
    floatleft;
    padding-left20px;
    backgroundurl(../img/icon-call.png) no-repeat center left;
}
 
.top .wellcome{
    floatright;
}
 
.top a{
    color#2da5e1;
    padding-left10px;
}
 
/* #header 模块内样式 */
 
.header .logo{
    width402px;
    height74px;
    padding9px 0;
    display: inline-block;
}
.header .logo img{
    width100%;
    height100%;
}
 
.header .search{
    width326px;
    height38px;
    positionabsolute;
    right0px;
    top29px;
    /* background-color: orange; */
}
 
 
/* #nav 模块内样式 */
.nav .link{
    display: inline-block;
    floatleft;
    padding-left20px;
    line-height36px;
    color#fff;
    font-size16px;
    min-width80px;
    text-aligncenter;
}
.nav a:hover{
    color#d7f3ff;
}
 
.nav .menu{
    width130px;
    padding-right30px;
    background-color#1fa4f0;
    positionrelative;
}
 
.nav .menu .menu-list{
    background-color#1fa4f0;
    width100%;
    height423px;
    positionabsolute;
    left0;
    top36px;
}
 
/* #banner 模块内样式 */
.banner-search{
    background-color#fafafa;
}
 
.banner-help .caption,
.banner-search .caption{
    height22px;
    padding15px 0 15px 0;
    text-aligncenter;
}
 
.banner-help .caption .text,
.banner-search .caption .text{
    display: inline-block;
    height22px;
    line-height22px;
    padding-left28px;
    color#fec009;
    backgroundurl(../img/icon-help.png) no-repeat 0 0;
}
.banner-search .form{
    height150px;
}
 
.banner-search .form .line{
    padding-bottom9px;
    text-aligncenter;
}
 
.banner-search .form .line select{
    width170px;
    font-size12px;
    z-index0;
    height26px;
    line-height26px;
    padding2px 0;
    color#666;
}
.banner-search .submit{
    height32px;
    text-aligncenter;
}
.banner-search .submit .button{
    width108px;
    height33px;
    background-color#fecd09;
    font-size14px;
    color#fff;
    border-radius: 3px;
}
 
.banner-help{
    background-color#fafafa;
}
.banner-help .caption .text{
    color#00b3ea;
    background-position0 -23px;
}
 
.banner-help .link{
    color#00b3ea;
    display: inline-block;
    width86px;
    height26px;
    line-height26px;
    font-size14px;
    text-aligncenter;
    padding0 0 8px 26px;
}
 
/* #content 模块样式 */
 
.content-news{
    background-color#fff;
    border1px solid #f4f6fa;
}
 
.content-close .caption,
.content-news .caption{
    height38px;
    line-height38px;
    background-color#f4f6fa;
    text-indent20px;
    color#fec009;
    font-size15px;
}
 
.content-close .more,
.content-news .more{
    floatright;
    padding-right22px;
    font-size12px;
    color#868686;
}
 
.content-close .list,
.content-news .list{
    padding15px 20px 13px 35px;
    line-height29px;
    font-size12px;
    backgroundurl(../img/list-yellow.jpg) 17px 20px no-repeat;
}
.content-close .list .link,
.content-news .list .link{
    displayblock;
    color#969696;
}
 
.content-close{
    background-color#fff;
    border1px solid #f4f6fa;
}
 
.content-close .caption{
    color#4ab4ed;
}
 
.content-close .list{
    background-imageurl(../img/list-blue.jpg);
}
 
.content-tab{
    backgroundnone;
}
.content-tab .caption{
    height34px;
    line-height34px;
    background-color#f5f6fa;
}
.content-tab .caption .item{
    displayblock;
    width112px;
    height34px;
    text-aligncenter;
    floatleft;
    color#00b3ea;
}
.content-tab .caption .item_focus{
    background-color#60bff2;
    color#fff;
}
 
.content-tab .block{
    border1px solid #f4f6fa;
    height452px;
}
 
.content-tab .block-caption{
    height26px;
    line-height26px;
    padding8px;
    border-bottom1px solid #f4f6fa;
}
 
.content-tab .block-caption-item{
    displayblock;
    padding0 10px
    font-size12px;
    color#4c4948;
    floatleft;
}
.content-tab .block-caption-item_focus{
    background-color#60bff2;
    color#fff;
}
 
.content-tab .block-content{
    padding16px 12px;
}
.content-tab .block-content .block-more{
    displayblock;
    line-height55px;
    text-aligncenter;
    color#5084c4;
    font-size14px;
}
/* 医院列表 - 容器 */
.content-tab .block-content .block-list{}
 
.content-tab .block-content .block-list .item{
    floatleft;
    width216px;
    height102px;
    padding0 20px 10px 120px;
    positionrelative;
    font-size12px;
}
 
.content-tab .block-content .block-list .item img{
    width110px;
    height98px;
    positionabsolute;
    left0;
    top0;
}
 
.content-tab .block-content .block-list .item-name{
    color#036eb7;
    font-size14px;
    line-height21px;
    padding-top13px;
}
.content-tab .block-content .block-list .item-level{
    floatright;
    font-size12px;
    color#979797;
}
.content-tab .block-content .block-list .item-phone,
.content-tab .block-content .block-list .item-address{
    line-height18px;
    padding-bottom4px;
    color#666;
}
 
/* 医院方案列表 - 容器 */
.content-tab .block-content .block-text-list{}
 
.content-tab .block-content .block-text-list .item{
    displayblock;
    width351px;
    height27px;
    font-size14px;
    color#666;
    padding-top8px;
    floatleft;
    border-bottom1px dashed #dcdddd;
}
.content-tab .block-content .block-text-list .item:nth-child(2n){
    margin-left13px;
}
 
.footer{
    line-height70px;
    text-aligncenter;
    font-size12px;
    color#666;
}
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
hosptia;.css
.nav .link_focus{
    columns: #fff;
    background#1fa4f0;
    padding0 10px;
}
 
.filter .group{
    width1200px;
    height180px;
    margin20px auto;
    font-size16px;
    background-color#eee;
    positionrelative;
}
 
.filter .group .caption{
    height60px;
    margin-left33px;
    line-height60px;
}
.filter .group .caption .condition{
    padding0 17px;
}
.filter .group .caption .condition:nth-child(2n){
    border-left1px solid #ccc;
    border-right1px solid #ccc;
}
.filter .group .caption .condition:last-child{
    border-right1px solid #ccc;
}
.filter .group .caption .condition:nth-child(1){
    width56px;
    height18px;
    padding1px 2px;
    margin-left45px;
    margin-right11px
    color#fff;
    background-color#60bff2;
    border-left1px solid #ccc;
    border-right1px solid #ccc;
}
.datalist{
    width1200px;
    height543px;
    border1px solid #eee;
}
.datalist .item{
    height157px;
    border1px solid #eee
    border-topnone;
}
.datalist .cover{
    floatleft;
    margin-top0px;
    margin-left15px;
    margin-right29px;
    positionrelative;
}
.datalist .item img{
    height130px;
}
.datalist .item .name{
    height41px;
    line-height41px;
    font-size18px;
    margin-top23px;
    font-weightbolder;
}
.datalist .item .name .level{
    color#dce318;
    padding-left19px;
    font-size16px;
}
.datalist .item .time,
.datalist .item .phone,
.datalist .item .address{
    height18px;
    margin0 0 7px 218px
    padding-left30px;
    font-size16px;
    color#ccc;
    positionrelative;
}
.datalist .item .time{
    backgroundurl(../img/icon-tel.png) 0 -36px  no-repeat;
}
.datalist .item .phone{
    backgroundurl(../img/icon-tel.png) 0 2px  no-repeat;
}
.datalist .item .address{
    backgroundurl(../img/icon-tel.png) 0 -18px  no-repeat;
}
.datalist .item:hover{
    background-color: rgba(0,0,255,.1);
}
 
.pagination{
    width1200px;
    height43px;
    line-height43px;
    text-aligncenter;
 
    border1px solid #eee;
    border-topnone;
}
.pagination .page_wrap{
    width1200px;
    height43px;
    line-height43px;
}
.pagination .page_wrap .item{
    display: inline-block;
    width23px;
    height23px;
    font-size20px;
    border1px solid #eee;
    border-radius: 3px;
    margin-top9px;
    text-aligncenter;
}

http://img1.sycdn.imooc.com//climg/5c76454600019c1612230086.jpg

http://img1.sycdn.imooc.com//climg/5c7645470001d72a07980211.jpg


正在回答 回答被采纳积分+1

登陆购买课程后可参与讨论,去登陆

4回答
山河远阔ZZ 2019-02-28 13:58:52

同学你好,我把底部区域的代码给你,你粘贴到你的代码上试试看,记得修改图片路径呀。

http://img1.sycdn.imooc.com//climg/5c777807000107b312480049.jpg

HTML:

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
 <div id="pagination" class="pagination wrap">
                        <a href="#0" class="item item_text item_first">首页</a>
                        <a href="#0" class="item item_icon item_prev">&nbsp;</a>
                        <span class="page_wrap">
                            <a href="#1" class="item item_prev">&nbsp;</a>
                            <a href="#1" class="item item_page">1</a>
                            <a href="#1" class="item item_page item_page_focus">2</a>
                            <a href="#1" class="item item_page">3</a>
                            <a href="#1" class="item item_next">&nbsp;</a>
                        </span>
                        <a href="#0" class="item item_icon item_next">&nbsp;</a>
                        <a href="#0" class="item item_text item_last">尾页</a>
                        <a href="#0" class="item item_count">共计3页</a>
                        <span href="#0" class="item item_text">到
                            <input type="text" class="input_page" name="input_page" />
                            <input type="button" class="input_submit" value="" />
                        </span>
                    </div>

CSS:

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
.pagination {
        width: 1200px;
        border: 1px solid red;
        text-align: center;
    }
 
    .page_wrap .item {
        display: inline-block;
        width: 23px;
        height: 23px;
        line-height: 23px;
        border: solid 1px #dcdddd;
        border-radius: 3px;
    }
 
    .item_prev {
        background: url(img/icon-pagination-arrow.png) no-repeat;
        background-position: 6px -15px;
    }
 
    .item_next {
        background: url(img/icon-pagination-arrow.png) no-repeat;
        background-position: 8px 4px;
    }
山河远阔ZZ 2019-02-28 12:15:47

同学你好,是在pagintion里面嵌套哦,参考下图:

http://img1.sycdn.imooc.com//climg/5c776053000141a809760121.jpg

http://img1.sycdn.imooc.com//climg/5c77606b00018bf103250088.jpg

可以试一试哦。

  • 提问者 菜鸟x #1
    ?还是有问题。。。
    2019-02-28 12:37:14
山河远阔ZZ 2019-02-28 09:49:12

同学你好,这是因为a标签的父元素里面用了line-height:43px,参考下图修改:

http://img1.sycdn.imooc.com//climg/5c773d680001dda703790125.jpg

http://img1.sycdn.imooc.com//climg/5c773d7c0001c7af03400178.jpg

底部布局建议:

通常情况下,会使用float浮动来进行布局:

先把a标签转成换成display:block元素,在通过float浮动来进行布局,参考下图:

http://img1.sycdn.imooc.com//climg/5c773dc60001ab9e03770276.jpg

让底部内容居中,建议在内容的外面再嵌套一个div容器,设置固定的宽度,在通过margin:0auto来设置居中效果。

祝学习愉快!~

  • 提问者 菜鸟x #1
    但是,下面的页数的多少是根据筛选内容而改变的,设置固定高度,到时候会不会出现问题啊?
    2019-02-28 10:05:27
  • 山河远阔ZZ 回复 提问者 菜鸟x #2
    同学你好,老师说的是,设置一个固定的宽度(例如:1200),那么筛选的内容都是存放在1200px里面,是不会有问题的哦。
    2019-02-28 10:34:12
  • 提问者 菜鸟x #3
    是Pagintion上再嵌套一个div吗?
    2019-02-28 11:25:41
山河远阔ZZ 2019-02-27 17:59:43

同学你好。

1、变色没有覆盖整个DIV:

  • 是因为name区域设置了margin-top:23px,如下:

    http://img1.sycdn.imooc.com//climg/5c765a0b0001368a12900092.jpg

    建议把margin-top改变为padding-top:

    http://img1.sycdn.imooc.com//climg/5c765a5b0001c0aa04350189.jpg

    cover区域设置margin-top:23,参考下图:

    http://img1.sycdn.imooc.com//climg/5c765aa70001cb6d04180200.jpg

2、图片路径出错,修改如下:

http://img1.sycdn.imooc.com//climg/5c765afb0001e27511390038.jpg

建议左右箭头使用背景图片的方式引入,这样可以通过图片定位来显示出一个左按钮或者一个右按钮,如下:

http://img1.sycdn.imooc.com//climg/5c765c280001ea4c09000091.jpg

3、同学是问底部为什么没有居中吗?

底部内容其实已经居中了哦,因为“到”后面有两个空的input标签快,所以导致效果看起来没有居中,如下:

http://img1.sycdn.imooc.com//climg/5c765f520001721210830058.jpg

可以自己试一试哦,如果帮助到了你,欢迎采纳。

祝学习愉快!

  • 提问者 菜鸟x #1
    我想问下,a标签为什么没有上下居中,a标签里的文字脱离出框了
    2019-02-28 09:21:54
问题已解决,确定采纳
还有疑问,暂不采纳

恭喜解决一个难题,获得1积分~

来为老师/同学的回答评分吧

0 星
请稍等 ...
微信客服

购课补贴
联系客服咨询优惠详情

帮助反馈 APP下载

慕课网APP
您的移动学习伙伴

公众号

扫描二维码
关注慕课网微信公众号

在线咨询

领取优惠

免费试听

领取大纲

扫描二维码,添加
你的专属老师
插入代码