jQuery css 애니메이션 반복/초기화(removeclass, addclass)
·
Programing/javascript
$(document).on('DOMSubtreeModified', 'div', function(e){ $(this).removeClass('animation'); // offsetWidth을 사용해서 요소의 상태를 초기화 처리 e.currentTarget.offsetWidth; $(this).show().addClass('animation'); }); remoClass와 addClass를 반복하면 .animation의 애니메이션효과는 반복되지 않는 현상이 있다. 이럴 때 e.currentTarget.offsetWidth; 를 사용하여 요소의 상태를 초기화를 해주면 애니메이션을 반복하여 실행시킬 수 있다.
iPhone & Android input radius css init
·
Programing/CSS
아이폰과 안드로이에서 사용된 input의 css가 제각기 틀리다.아이폰의 경우 보더에 라운딩처리까지 되어 있다. [Desktop][Mobile] 이를 해결하기위해 아래 코드를 입력하면 desktop과 mobile이 동일하게 나온다.input {-webkit-border-radius:0; border-radius:0;}