<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<style>
#popupImage {
position: fixed;
bottom: -200px;
right: 20px;
width: 150px;
opacity: 0;
transition: all 1s ease;
}
#popupImage.show {
bottom: 20px;
opacity: 1;
}
#popupImage.hide {
bottom: -200px;
opacity: 0;
}
</style>
</head>
<body>
<img id="popupImage"
src="./111.jpg"
alt="광고">
<script>
window.xxonload = function() {
const img = document.getElementById("popupImage");
// 1초 후 올라오기
setTimeout(function() {
img.classList.add("show");
}, 1000);
// 5초 후 내려가기
setTimeout(function() {
img.classList.remove("show");
img.classList.add("hide");
}, 5000);
};
</script>
</body>
</html>
카페 게시글
도사의컴퓨터강의
괜찮은 웹 소스....오른쪽하단에서 서서히 올라와 없어지는 그림....
김종록
추천 0
조회 29
26.06.03 11:28
댓글 0
다음검색