2012-01-30 2 views
1

미리보기 이미지를 클릭 할 때 열리는 이미지 상자의 높이 및 너비를 수정하려하지만 성공하지 못했습니다.라이트 박스 높이 및 너비 변경

이 지금까지

@for (int i = 0; i < Model.count; i++) 
{ 
    <a href= "@Url.Action("GetImage", "Image", new { id = i })" rel="prettyPhoto[pp_gal]"> 
    <img src= "@Url.Action("GetImage", "Image", new { id = i })" alt="Image @(i+1)" width="240" height="240" /></a> 
}  
<script type="text/javascript"> 
    $(document).ready(function() { 
     $("a[rel^='prettyPhoto']").prettyPhoto({ 
      autoplay_slideshow: false, 
      show_title: true, 
      default_width: 300, //I have tried playing with these values 
      default_height: 200, //I have tried playing with these values 
      theme: 'pp_default', 
      overlay_gallery: false,     
      social_tools: false 
     }); 
    }); 
</script> 

어떤 도움을 주시면 감사하겠습니다 내 코드입니다.

답변

0

나는 역시 시도했지만 같은 행운을.

그래서 어떤 부정 행위 :

확인 PrettyPhoto.css 파일 div.pp_pic_holder에 대한 /css/prettyPhoto.css 검색을했고, !important

Ex.width: 825px !important; 

환호에 필요한 폭을 적용!

2

jquery.prettyPhoto.js에서 다음과 같은 변수를 수정해야합니다

imageWidth = v-200; // change to -30 
imageHeight = d-200; // change to -90 
0

간단한 방법은 쉽게 CSS를

div.pp_pic_holder { width: 300px!important; } 
.pp_content { width: 275px!important; } 
a.pp_close { right: 60%; } 
div.pp_pic_holder { left: 40%!important; } 
를 사용하여 제어
관련 문제