padding 소스가 안먹히는데 봐주실래욤?
본문
답변 3
#ban a{display:inline-block;}
#ban img{padding-bottom:10%;}
#ban a:last-child img{padding-bottom:0%;}
last-child 부분을 변경해 보세요
참조 ) 그리고 높이 %를 사용하시려면
스트립트를 이용하시면 됩니다.
그리고 #ban a:last-child img{padding-bottom:0% !important;}
jQuery(document).ready(function(){
jQuery("#ban img").each(function(){
var padding_bottom=parseInt(jQuery(this).height() / 10); //이미지의 10%
jQuery(this).closest("a").css("padding-bottom", padding_bottom);
});
});
padding은 안,
margin은 밖.
각각의 이미지에 클래스를 부여 후,
해당 클래스에 대해서 미디어 속성으로 적용할 범위 지정 후,
margin이나 positon:relative 이용해 조절해 보세요.
a 태그속성에 넣어주셔야합니다.
답변을 작성하시기 전에 로그인 해주세요.