작동합니다 같아요
<div class="content-container">
<p><img src="whatever" /> text text text text text
text text text text text text text text text text text
text text text text text text text text text text text
text text text text text text text text text text text
text text text </p>
</div>
만 CSS와 함께 할 수있는 방법은 없습니다.
// Loop through all the images
$('.content-container img').each(function(){
// Get image height
var imageHeight = $(this).height();
// Get container's height
var containerHeight = $(this).parent('.content-container').height();
// Set image bottom margin to container's height - image height
jQuery(this).css('margin-bottom', (containerHeight - imageHeight) + 'px');
})
현재 html을 바이올린으로 만들어 게시하십시오. – mithunsatheesh
예 .. 보려는 코드 스 니펫을 추가하십시오. 기념일 로고는 작동하지 않습니다. –
템플릿이지만 일반적인 예를 만들려고합니다. [여기] (http://pastebin.com/4Cvd88Gf) – astex