728x90
<style>
.ani_background_color{
-webkit-animation-name: bc;
-webkit-animation-duration: 0.5s;
-webkit-animation-iteration-count: 2;
animation-duration: 0.5s;
animation-name: bc;
animation-iteration-count: 2;
}
@-webkit-keyframes bc {
from {background-color: white;}
to {background-color: #eee;}
}
@keyframes bc {
from {background-color: white;}
to {background-color: #eee;}
}
</style>
<script>
$(document).ready(function(){
var contract_num = sessionStorage.getItem("contractNum");
if(contract_num != null){
for(let i = 1; i < 13; i++){
var data_contractnum = $("li.item:nth-child("+i+")").data("contractnum");
if(contract_num == data_contractnum){
$('li.item[data-contractnum="' + contract_num + '"]').addClass("ani_background_color");
}
}
$('html, body').animate({scrollTop: $('.ani_background_color').offset().top-300, scrollLeft : 500}, '300');
sessionStorage.clear();
}
});
</script>
728x90
'front > HTML, CSS' 카테고리의 다른 글
[HTML] textarea :: (input type="text"와는 다름!) (0) | 2023.03.22 |
---|---|
[CSS] hover 시 말풍선 효과 (0) | 2023.02.07 |
[CSS] 틀 고정(행 또는 열 고정) (0) | 2022.11.10 |
[HTML] select 목록을 그룹별로. (0) | 2022.04.01 |
[HTML] 호버 시 딜레이 되며 나타나기 (transition: all ease 1s 0s) (0) | 2022.02.23 |