열기 닫기 아코디언(?) 토글(?) 형식 배너 만들기
입맛에 맞게 css나 마크업 수정하시면 될 것 같습니다.

[code]
<style>
/* Floating style start */
.FloatingWrap{position: fixed;bottom: 0;left: 0;width: 100%;background: #f00;z-index: 100;}
.FloatingBox{}
.FloatingOpen{text-align: right;position: relative;padding: 5px 50px;}
.FloatingOpen span{cursor:pointer;width: 100px;height: 70px;text-align: center;display: inline-flex;justify-content: center;align-items: center;background: #000;color:#fff}
.FloatingOpen #FloatingOpenBtn{color:#fff;}
.FloaingDB{display: none;background: #ddd;height: 250px;}
/* Floating style end */
</style>
<div class="FloatingWrap">
<div class="FloatingBox">
<div class="FloatingOpen">
<span>
<div id="FloatingText">열기</div>
<img id="FloatingOpenBtn" src="<?php echo G5_THEME_IMG_URL ?>/FloatingArrowDown.png"">
</span>
</div>
<div class="FloaingDB">
asd
</div>
</div>
</div>
<script>
$(function () {
$(".FloatingOpen span").on("click", function() {
$(".FloaingDB").slideToggle("fast", function() {
var image = $("#FloatingOpenBtn");
var text = $("#FloatingText");
if (image.attr("src").includes("FloatingArrowDown.png")) {
image.attr("src", "<?php echo G5_THEME_IMG_URL ?>/FloatingArrowUp.png");
text.text("닫기");
} else {
image.attr("src", "<?php echo G5_THEME_IMG_URL ?>/FloatingArrowDown.png");
text.text("열기");
}
image.fadeIn(2050);
});
});
});
</script>
[/code]
댓글 4개
좋아요, 감사 합니다.
감사 합니다.
좋은자료~~ 감사합니다~~
게시판 목록
개발자팁
질문은 QA에서 해주시기 바랍니다.
| 번호 | 분류 | 제목 | 글쓴이 | 날짜 | 조회 |
|---|---|---|---|---|---|
| 5126 | PHP |
|
3년 전 | 1797 | |
| 5125 | PHP | 3년 전 | 1598 | ||
| 5124 | PHP | 3년 전 | 2115 | ||
| 5123 | OS | 3년 전 | 1396 | ||
| 5122 | OS | 3년 전 | 1313 | ||
| 5121 | OS | 3년 전 | 1419 | ||
| 5120 | OS | 3년 전 | 1296 | ||
| 5119 | PHP |
|
3년 전 | 1143 | |
| 5118 | PHP | 3년 전 | 1353 | ||
| 5117 | Mobile |
|
3년 전 | 1397 | |
| 5116 | PHP | 3년 전 | 2291 | ||
| 5115 | MySQL |
welcome
|
3년 전 | 2903 | |
| 5114 | OS | 3년 전 | 2002 | ||
| 5113 | JavaScript | 3년 전 | 1539 | ||
| 5112 | PHP | 3년 전 | 1558 | ||
| 5111 | 기타 |
|
3년 전 | 1298 | |
| 5110 | PHP | 3년 전 | 4545 | ||
| 5109 | PHP | 3년 전 | 1578 | ||
| 5108 | 기타 |
|
3년 전 | 12175 | |
| 5107 | 기타 |
|
3년 전 | 2408 | |
| 5106 | 기타 |
|
3년 전 | 6321 | |
| 5105 | 기타 |
|
3년 전 | 3694 | |
| 5104 | 기타 |
|
3년 전 | 1501 | |
| 5103 | JavaScript | 3년 전 | 1691 | ||
| 5102 | 기타 |
|
3년 전 | 1269 | |
| 5101 | 기타 |
|
3년 전 | 1465 | |
| 5100 | 기타 |
|
3년 전 | 1305 | |
| 5099 | 웹서버 | 3년 전 | 2171 | ||
| 5098 | PHP | 3년 전 | 1326 | ||
| 5097 | PHP |
|
3년 전 | 1986 |
댓글 작성
댓글을 작성하시려면 로그인이 필요합니다.
로그인하기