나는이 게시물과 비슷한 이슈를 여러 번 보았지만 그 중 누구도 내 문제를 해결하지 못했습니다. 그것을 조정 사업부의 보이는 높이의 크기를 조정 이벤트와오버 플로우 콘텐츠의 div 높이
.general_scrollingContainer {
overflow-y: scroll;
padding: 0 10px;
width: 100%;
}
및 자바 스크립트 :
<div id="scroller" class="general_scrollingContainer" layout="column" layout-fill layout-align="top left">
<ul class="dynamic-grid" angular-grid="pics"
ag-grid-width="200"
ag-gutter-size="10"
ag-id="gallery"
refresh-on-img-load="true">
<li class="grid" ng-repeat="product in products">
<a ng-href="{{product.link_shop}}" target="_blank">
<img class="grid-img" ng-src="{{product.url_imagen}}" />
</a>
<div class="img-desc-wrap" layout="column" layout-fill layout-align="top left">
<a class="title" ng-href="{{product.link_shop}}" target="_blank" style="font-size:12px;line-height:16px">
{{product.title}}
</a>
<div class="date"><b>Category</b>: {{product.category_name}}</div>
<div class="object_icons_holder" layout="row" layout-align="space-between stretch">
<div flex layout-align="start center" layout="row">
<ng-md-icon icon="share" size="30" style="fill:#666;margin:-5px 0 0 10px" class="social_icon" aria-label="Share Product"
ng-click="showSocialShare($event, 0)">
<md-tooltip md-direction="top">
Share in Social Networks
</md-tooltip>
</ng-md-icon>
</div>
<div class="shop_price">{{product.price}}</div>
</div>
</div>
</li>
</ul>
</div>
클래스 general_scrollingContainer에 대한 CSS : 여기
나는 HTML을 게시 :
$(window).resize(function() {
var $main_container = $(window).height();
$(".general_scrollingContainer").css({
"height": ($main_container - 160) + 'px'
});
});
주 div ' general_scrollingContainer '은 창 높이에 따라 고정 된 높이를 가지며 내부는 보이는 영역을 오버 플로우하는 요소입니다.
질문은 하단으로 스크롤 할 때 이벤트를 가져오고 보이지 않는 높이를 포함하여 div의 실제 높이가 필요하다는 것입니다.
$('div.general_scrollingContainer').innerHeight()
을 사용하면 $('div.general_scrollingContainer').height()
과 같은 값인 DIV의 보이는 영역의 높이 만 표시하므로 전체 높이를 얻는 방법을 알 수 없습니다.
어떤 도움이 필요합니까?