Browse Source

解决资源图片变形问题

luyanan 8 years ago
parent
commit
ce66aec30c
9 changed files with 43 additions and 19 deletions
  1. 5 5
      css/common.css
  2. 26 6
      css/index.css
  3. BIN
      images/default-resource.jpg
  4. 4 1
      js/information.brow.js
  5. 2 1
      js/information.js
  6. 1 1
      js/newsciresource.js
  7. 3 3
      js/popup.js
  8. 1 1
      js/search.js
  9. 1 1
      js/workindex.js

+ 5 - 5
css/common.css

@ -10,8 +10,8 @@
10 10
.defaultColor{ color:#333;}
11 11
/*文字*/
12 12
.h1Font{font-size:20px;} /*标题*/
13
.h2Font{font-size:18px;} 
14
.h3Font{font-size:16px;} 
13
.h2Font{font-size:18px; line-height:30px; color:#333; } 
14
.h3Font{font-size:16px; line-height:28px; color:#555; } 
15 15
.h4Font{font-size:14px; line-height:26px; color:#333;} 
16 16
.h5Font{font-size:14px; line-height:22px; color:#666;} 
17 17
.h6Font{font-size:13px;color:#888;margin-left:8px;} 
@ -66,7 +66,7 @@ url(../images/index-icon.png) no-repeat; background-position:left; margin:8px;}
66 66
.myWorkspace{font-size: 14px;line-height:40px; text-align: center;float: left; margin-top: 10px;color: #fff;}
67 67
/*主体部分*/
68 68
#container{ min-width:1100px;min-height:90%; background:#fff;overflow: hidden;}
69

69
.contentBody{width:1050px;height:auto; margin:10px auto; padding:80px 0 2px 0; }
70 70
/*footer部分*/
71 71
#footer{ min-width:1100px;background:#ff9900;clear: both;height:100px; position: relative; z-index: 1001; text-align:center;}
72 72
#footer .wrapper {margin-left:80px;position: relative;padding: 15px 20px; min-width:1000px;}
@ -155,9 +155,9 @@ url(../images/index-icon.png) no-repeat; background-position:left; margin:8px;}
155 155
.nodatabox .txtbox .keyword{ padding:0 6px;color:#555555;}
156 156
/***********************缺省页面*******************/
157 157

158
.ResImgBox{display: inline-block;text-align: center;max-width:64px;width:64px;height:60px;padding:1px;background:#FAFAFA;border:1px solid #F8F8F8;overflow: hidden;padding:2px; margin: 6px 0;border-radius:4px;}
158
.ResImgBox{display: inline-block;text-align: center;max-width:100px;margin:6px 0;width:100px;height:100px;background:#FAFAFA;border:1px solid #F8F8F8;overflow: hidden;padding:1%;border-radius:4px;}
159 159
.ResImgBox .resImg{max-width: 100%;max-height: 100%;vertical-align: middle;position: relative;}
160
.ResImgBox:before {content: ' ';display: inline-block;vertical-align: middle;width: 0;height: 100%;overflow: hidden;margin-left: -4px;}
160
.ResImgBox:before {content: ' ';display: inline-block;vertical-align: middle;width: 0;height: 100%;overflow: hidden;margin-left: 0px;}
161 161

162 162

163 163


+ 26 - 6
css/index.css

@ -215,7 +215,7 @@ input[type='radio'].radio:checked + .radio {background:url(../images/redio.png)
215 215
.coulstblock .coulstbox .prohead{ width:80px;margin-left:40px; overflow:hidden;}
216 216
.coulstblock .coulstbox .proinfomation{margin:0 2%;width:60%; overflow:hidden;}
217 217
.coulstblock .coulstbox .coulstbtn{padding:24px 10px; margin-right: 20px;}
218
.coulstblock .coulstbox .coulstbtn span,#conbtn span{padding:5px 40px; display:block; border-radius:4px; text-align:center; color:#fff; background:#ff9900;cursor:pointer}
218
.coulstbtn span,#conbtn span{padding:5px 40px;margin-right:6px; border-radius:4px; text-align:center; color:#fff; background:#ff9900;cursor:pointer}
219 219
/*专家信息头部*/
220 220
.information-head{ width:1050px; margin:auto;background:#fff; border:1px  solid #eaeaea; margin-top:30px; padding:20px 30px; position: relative;}
221 221
.head-left{ float:left;width:200px; height:200px; position:relative;overflow:hidden;}
@ -377,7 +377,7 @@ label.edu-radio{ float:none;font-size:16px;line-height:26px; color:#868686; }
377 377
.sharescrollbox .briefinfor{ width:100%; max-height:100px; text-overflow:ellipsis; overflow:hidden; color:#777; }
378 378
.sharescrollbox .shareshow{ position: relative; width: 200px; height: 200px;border-radius: 4px; overflow: hidden;}
379 379
.shareopeart{ position:absolute; bottom:0px; left:0px; z-index:100; overflow:hidden; width:100%;}
380
.sharebtn{ display:block; text-align:center; float:left; cursor:pointer; width:100%; height:30px;font-size:14px;line-height:30px; background:rgba(0,0,0,.2); color:#fff; border:1px solid #d6d6d6;}
380
.sharebtn{ display:block; text-align:center; float:left; cursor:pointer; width:100%; height:30px;font-size:14px;line-height:30px; background:rgba(0,0,0,.2); color:#fff; /*border:1px solid #d6d6d6;*/}
381 381
.sharebtn:hover{ color:#fff; background:#ff9900;}
382 382
.resoubtn{ position:absolute;top:40%; width:30px; height:41px; background:#ccc; border-width:1px 1px 0 1px; display:none; cursor:pointer;}
383 383
.resouprev{left:-4px;background:url(../images/arrows.png) -30px 0 no-repeat;}
@ -414,7 +414,27 @@ label.edu-radio{ float:none;font-size:16px;line-height:26px; color:#868686; }
414 414
.subuser li .evaimg{ display:block; width:60px; height:60px; overflow:hidden; border:1px solid #999; border-radius:4px; margin:auto;}
415 415
#evastarboxx .staspan{background: url(../images/evastar.png) 0 1px no-repeat;}
416 416

417

418

419

420

417
/*资源详细信息页面*/
418
.resouLeft{ width: 79%;/*border:1px solid #eaeaea;*/}
419
.resTop{padding:6px;position: relative;padding:20px 10px;background:#FFFFFF;}
420
.resBrief{width:60%;min-height: 300px;margin-right:1%;}
421
.subtit{color:#888888; padding-right:6px; }
422
.resAbout{margin:6px 0;padding: 4px 6px; background: #f0f0f0;margin-bottom: 46px;}
423
.resAbout .subtit{line-height: 36px; }
424
.resUlbox {margin: 1% 2%;}
425
.resUl {width:85%;color:#666666}
426
.resUl li{ float: left; margin: 1%;padding:4px 16px; background: #FFFFFF; /*border: 1px solid #e6e6e6;*/border-radius: 6px;}
427

428
.resBottom{margin:10px 0;padding:20px 10px;background:#FFFFFF;}
429
.resMore{margin:10px 30px 30px 30px; border:1px solid #eaeaea; min-height: 640px;}
430

431
.resouRight{ width: 20%;}
432
.rightBlock{ min-height: 352px;padding:16px 10px;margin-bottom:10px; background: #FFFFFF;}
433
.proImg{ text-align: center;}
434
.proImg img{ width:180px;}
435
.proInfo{padding:10px 16px;}
436
.otherRes{padding:10px;}
437
.otherRes li{border: 1px solid #e4e5e7;margin:10px 0;border-radius: 6px;cursor: pointer;}
438
.otherRes li a{display: block;}
439
.otherRes li .resoumag .resourceImgBox{ max-width:168px;width:168px;height: 168px;margin:0;}
440
.otherRes li .resoumag h2{color: #666666; text-align: center; padding:10px;}

BIN
images/default-resource.jpg


+ 4 - 1
js/information.brow.js

@ -587,7 +587,10 @@ var resou;
587 587
					for(var i=0;i<data.data.length;i++){
588 588
						add='<div class="sharesrc">'
589 589
						add+='<div class="shareshow">'
590
	                	add+='<a class="remess" resourceId='+data.data[i].resourceId+'><img src="/images/resource/'+data.data[i].resourceId+'.jpg" width="100%" height="100%" class="resourceImg"></a>'
590
	                	add+='<a class="remess" resourceId='+data.data[i].resourceId+'>'
591
	                	add+='<div class="ResImgBox" style="max-width:200px;width:200px;height: 200px;margin:0;">'
592
						add+='<img class="resImg headRadius resourceImg" src="/images/resource/'+data.data[i].resourceId+'.jpg" />'
593
						add+='</div></a>'
591 594
	                 	add+='<div class="shareopeart"><a class="sharebtn resourceConsult" professorId='+data.data[i]["professorId"]+'>咨询</a><a class="sharebtn applicant" style="display:none">申请</a></div>'
592 595
	             		add+='</div>'
593 596
	             		add+='<p class="restit">资源名称:<span class="presou consultTitleVal" resourceConsultTitle = "">'+ data.data[i].resourceName+'</span></p>'

+ 2 - 1
js/information.js

@ -2021,7 +2021,8 @@ $("#honorShow").on("click", ".infor-save",function () {
2021 2021
					for(var i=0;i<data.data.length;i++){
2022 2022
						add='<div class="sharesrc">'
2023 2023
						add+='<div class="shareshow">'
2024
	                	add+='<a><img src="/images/resource/'+data.data[i].resourceId+'.jpg" width="100%" height="100%" class="resouImage"></a>'
2024
	                	add+='<a><div class="ResImgBox" style="max-width:200px;width:200px;height: 200px;margin:0;">'
2025
						add+='<img class="resImg headRadius resourceImg" src="/images/resource/'+data.data[i].resourceId+'.jpg" /></div></a>'
2025 2026
	                 	add+='<div class="shareopeart"></div>'
2026 2027
	             		add+='</div>'	             
2027 2028
	             		add+='<p class="restit">资源名称:<span class="presou">'+ data.data[i].resourceName+'</span></p>'

+ 1 - 1
js/newsciresource.js

@ -285,7 +285,7 @@ $(function(){
285 285
							add+='<th width="12%">联系人</th><th width="14%">交付时间</th>'        
286 286
							add+='<th width="20%">付款进程</th><th width="12%">状态/操作</th></tr></table><div class="tcdPageCode tcdPageCod'+i+'"></div></div>';*/
287 287
						    var add='<div class="addworkbtn-list"> <div class="resoumag">'
288
						    	add+='<h3><img src="" class="resourceImg"></h3>'               
288
						    	add+='<div class="ResImgBox" style="max-width:226px;width:226px;height: 226px;margin:0;"><img class="resImg headRadius resourceImg" src="" /></div>'               
289 289
								add+='<h2>'+data.data[i].resourceName+'</h2>' 
290 290
								add+='<p>'+data.data[i].supportedServices+'</p>' 
291 291
								add+='</div></div>'; 	

+ 3 - 3
js/popup.js

@ -283,7 +283,7 @@ function ResourceMessage() {
283 283
	PopHtml +='<div class="resouimgbox floatL" style="width:240px;">';
284 284
	PopHtml += '<div class="resouinforcon">';
285 285
	PopHtml += '<div class="resouimg" >';
286
	PopHtml += '<div class="resouimgshow" style="height:220px;width:220px;"><img width="100%" height="100%" src="" class="resouImage" /></div></div>';
286
	PopHtml += '<div class="resouimgshow" style="height:220px;width:220px;"><div class="ResImgBox" style="max-width:220px;width:220px;height: 220px;margin:0;"><img class="resImg headRadius resouImage" src="" /></div></div></div>';
287 287
	PopHtml += '</div></div>';
288 288
	PopHtml += '</div></form>';
289 289
	//关闭按钮
@ -327,7 +327,7 @@ function ResourceApply(){
327 327
		PopHtml += '<tr><th class="resouinfotype " scope="row">交付时间</th><td><div class="resouinforcon"><input type="text" readOnly="true" id="datepicker"class="frmtype dealTime"style="width:200px;"></div></td></tr>';
328 328
		PopHtml += '<tr class="limitBox"><th class="resouinfotype"  scope="row">具体需求</th><td class="limitwordbox"><div class="resouinforcon limitwords"><textarea class="frmtype detail"></textarea></div></td></tr></table>';
329 329
		
330
		PopHtml += '<div class="resouimgbox floatL"><div class="resouinforcon"><div class="resouimg2" ><img src="" width="100%" height="100%"  class="resouImage"></div></div></div></div>';
330
		PopHtml += '<div class="resouimgbox floatL"><div class="resouinforcon"><div class="resouimg2" ><div class="ResImgBox" style="max-width:220px;width:220px;height: 220px;margin:0;"><img class="resImg headRadius resouImage" src="" /></div></div></div></div></div>';
331 331
		
332 332
		//相关文件上传
333 333
		PopHtml += '<div class="filebox"style="display:none;"> ';
@ -610,7 +610,7 @@ function DetailInfo(){
610 610
		PopHtml += '<tr class="limitBox"><th class="resouinfotype" scope="row">备注</th><td class="limitwordbox"><div class="resouinforcon limitwords"id="consultContent"></div></td></tr></table>';
611 611
		PopHtml += '</table>';
612 612
		
613
		PopHtml += '<div class="resouimgbox1 floatL"><div class="resouinforcon"><div class="resoushowimg1" ><img src="" width="100%" height="100%"  class="resouImage"></div></div></div></div>';
613
		PopHtml += '<div class="resouimgbox1 floatL"><div class="resouinforcon"><div class="resoushowimg1" ><div class="ResImgBox" style="max-width:220px;width:220px;height: 220px;margin:0;"><img class="resImg headRadius resouImage" src="" /></div></div></div></div></div>';
614 614
		//文件	
615 615
		PopHtml += '<div class="filebox"> ';
616 616
		PopHtml += '<div class="worktit">相关文件<div class="uploadbtn">上传文件</div></div>';

+ 1 - 1
js/search.js

@ -214,7 +214,7 @@ $(function() {
214 214
						var $da = data.data.data;
215 215
						for(var i = 0; i < $da.length; i++) {
216 216
							var add = '<div class="item"><div class="remess" resourceId=' + $da[i].resourceId + '>'
217
							add += '<a class="resourcephoto headRadius" ><img src="" class="resourceImg" width="100%" height="100%" ></a>'
217
							add += '<a class="resourcephoto headRadius" ><div class="ResImgBox" style="margin:0;background:#ffffff;"><img class="resImg headRadius resourceImg" src="" /></div></a>'
218 218
							add += '<div class="synopsis" style="width:66%;">'
219 219
							add += '<div class="cousultName"><a class="resouname" href="javascript:void();">' + $da[i].resourceName + '</a></div>'
220 220
							if($da[i].professor.name) {

+ 1 - 1
js/workindex.js

@ -107,7 +107,7 @@ $(function(){
107 107
					for(var i=0;i<data.data.length;i++)
108 108
						{
109 109
						    var add='<div class="addworkbtn-list"> <div class="resoumag">'
110
						    	add+='<h3><img src="" class="resourceImg"></h3>'               
110
						    	add+='<div class="ResImgBox" style="max-width:200px;width:200px;height: 200px;margin:0;"><img class="resImg headRadius resourceImg" src="" /></div>'               
111 111
								add+='<h2>'+data.data[i].resourceName+'</h2>' 
112 112
								add+='<p>'+data.data[i].supportedServices+'</p>' 
113 113
								add+='</div></div>';