๋ณธ๋ฌธ ๋ฐ”๋กœ๊ฐ€๊ธฐ
SEO

[ ํ‹ฐ์Šคํ† ๋ฆฌ ๋™์  ์ด๋ฏธ์ง€ ๋ฒ ๋„ˆ ์ฝ”๋“œ ] ๋™์  ๊ฐค๋Ÿฌ๋ฆฌ ๋ฆฌ์ŠคํŠธ ์ด๋ฏธ์ง€ ๋ฐฐ๋„ˆ ์ œ์ž‘

๋ฐ˜์‘ํ˜•

๋™์  ์ด๋ฏธ์ง€ ๋ฐฐ๋„ˆ๋กœ ํ‹ฐ์Šคํ† ๋ฆฌ ๋ธ”๋กœ๊ทธ ๋””์ž์ธ ๊ฐœ์„ ํ•˜๋Š” ๋ฐฉ๋ฒ•

๊ฐค๋Ÿฌ๋ฆฌ ๋ฆฌ์ŠคํŠธ ์ด๋ฏธ์ง€ ๋™์  ๋ฒ ๋„ˆ

๋™์  ์ด๋ฏธ์ง€ ๋ฒ ๋„ˆ๋ฅผ ์‚ฌ์šฉํ•˜๊ฒŒ ๋˜๋ฉด ์ •์ ์ธ ์ด๋ฏธ์ง€๋ฅผ ์‚ฌ์šฉํ• ๋•Œ ๋ณด๋‹ค ์ข€๋” ์‚ฌ์šฉ์ž์—๊ฒŒ ๋” ๋งŽ์€ ์ •๋ณด๋ฅผ ์ œ๊ณตํ• ์ˆ˜ ์žˆ๊ณ  ๋ธ”๋กœ๊ทธ๊ฐ€ ๋””์ž์ธ์ ์œผ๋กœ ํ˜ธ๊ฐ์„ ๋ถˆ๋Ÿฌ์˜ฌ์ˆ˜ ์žˆ์Šต๋‹ˆ๋‹ค. ํŠนํžˆ ์‚ฌ์ง„์ด๋‚˜ ์ œํ’ˆ๋“ฑ ์ด๋ฏธ์ง€์™€ ์˜์ƒ์„ ์ฃผ ์ฝ˜ํ…์ธ ๋กœ ์šด์˜ํ•˜๋Š” ๋ธ”๋กœ๊ทธ ์šด์˜์ž๋ผ๋ฉด ์ž์‹ ์˜ ๋ธ”๋กœ๊ทธ์— ๋™์  ๋ฒ ๋„ˆ ์ด๋ฏธ์ง€๋ฅผ ์‚ฌ์šฉํ•˜๋ฏ€๋กœ์จ ๋ธ”๋กœ๊ทธ๋ฅผ ์ข€๋” ๊ฐœ์„ฑ์žˆ๊ณ  ์ฐจ๋ณ„ํ™”์‹œํ‚ฌ์ˆ˜ ์žˆ์Šต๋‹ˆ๋‹ค.

์•„๋ž˜๋Š” ์ผ๋ฐ˜์ ์œผ๋กœ ํ‹ฐ์Šคํ† ๋ฆฌ ์Šคํ‚จ ๋ฉ”์ธ ํ™”๋ฉด์— ์Šคํ‚จ์„ ์‚ฌ์šฉํ•ด์„œ ๋™์ ์ด๋ฏธ์ง€ ๋ฒ ๋„ˆ๋ฅผ ์‚ฌ์šฉํ•˜๋Š” ๋ฐฉ๋ฒ•์ž…๋‹ˆ๋‹ค.

๋™์  ์ด๋ฏธ ๋ฒ ๋„ˆ ์ œ์ž‘ ๋ฐฉ๋ฒ•

ํ‹ฐ์Šคํ† ๋ฆฌ ์Šคํ‚จ์—์„œ๋Š” ํ™ˆ ์„ค์ •์—์„œ ์ตœ์‹ ๊ธ€ ์™ธ์—๋„ ๋‹ค์–‘ํ•œ ์ปค๋ฒ„๋ฅผ ์ง€์›ํ•˜๊ณ  ์žˆ์Šต๋‹ˆ๋‹ค. ์ด ์ปค๋ฒ„์ค‘ ์ž˜ ์‚ฌ์šฉํ•˜์ง€ ์•Š๋Š” ์ปค๋ฒ„๋ฅผ ์„ ํƒํ•ด์„œ ์ปค๋ฒ„์˜ ์ฝ”๋“œ๋ฅผ ์•„๋ž˜์˜ ์ฝ”๋“œ๋กœ ๋ณ€๊ฒฝํ•˜๊ฒŒ ๋˜๋ฉด ๋™์  ์ด๋ฏธ์ง€ ๋ฒ ๋„ˆ๋ฅผ ๊ตฌํ˜„ ํ• ์ˆ˜ ์žˆ์Šต๋‹ˆ๋‹ค. ์•„๋ž˜๋Š” Magazine ์Šคํ‚จ์˜ ์˜ˆ์ž…๋‹ˆ๋‹ค.

ํ‹ฐ์Šคํ† ๋ฆฌ ์Šคํ‚จ Magazine

  • ์Šฌ๋ผ์ด๋“œ ํƒ์ƒ‰: ํ™”์‚ดํ‘œ ๋ฒ„ํŠผ์„ ๋ˆŒ๋Ÿฌ ์ขŒ์šฐ๋กœ ์ด๋™ ๊ฐ€๋Šฅ.
  • ์ž๋™ ์Šฌ๋ผ์ด๋“œ: ์‚ฌ์šฉ์ž๊ฐ€ ์กฐ์ž‘ํ•˜์ง€ ์•Š์„ ๊ฒฝ์šฐ ์ผ์ • ์‹œ๊ฐ„ ๊ฐ„๊ฒฉ์œผ๋กœ ์Šฌ๋ผ์ด๋“œ๊ฐ€ ์ž๋™์œผ๋กœ ์ด๋™.
  • ์ค‘๋‹จ/์žฌ๊ฐœ: ๋งˆ์šฐ์Šค๋ฅผ ๋ฐฐ๋„ˆ ์œ„์— ์˜ฌ๋ฆฌ๋ฉด ์ž๋™ ์Šฌ๋ผ์ด๋“œ๊ฐ€ ๋ฉˆ์ถ”๊ณ , ๋งˆ์šฐ์Šค๋ฅผ ๋ฒ—์–ด๋‚˜๋ฉด ๋‹ค์‹œ ์‹œ์ž‘.
  • ํฌ๊ธฐ ์กฐ์ •: ์Šฌ๋ผ์ด๋“œ ํ•ญ๋ชฉ์˜ ํฌ๊ธฐ๋ฅผ CSS์™€ JavaScript์—์„œ ๋™์ ์œผ๋กœ ๊ณ„์‚ฐ.

ํ‹ฐ์Šคํ† ๋ฆฌ ์ปค๋ฒ„ ์ข…๋ฅ˜

  • ์Šฌ๋ผ์ด๋”
  • ์„ฌ๋„ค์ผ ๋ฆฌ์ŠคํŠธ1
  • ์„ฌ๋„ค์ผ ๋ฆฌ์ŠคํŠธ 2
  • ์Šฌ๋ผ์ด๋“œ ๋ฆฌ์ŠคํŠธ 1
  • ์Šฌ๋ผ์ด๋“œ ๋ฆฌ์ŠคํŠธ 2
  • ๋ฆฌ์ŠคํŠธ

HTML ์ฝ”๋“œ

    <div class="custom-slider section_area scroll_area category_area">
        <h2 class="tit_section"></h2>
        <div class="custom-slider__wrap-scroller custom-slider__wrap-category-scroller">
            <div class="custom-slider__scroller">
                <s_cover_item>
                    <div class="custom-slider__item">
                        <div class="custom-slider__box-item">
                            <a href="" title="" class="link_item">
                                <s_cover_item_thumbnail>
                                    <div
                                        class="custom-slider__box-thumb custom-slider__thumb-img"
                                        data-thumbnail=""></div>
                                </s_cover_item_thumbnail>
                                <div class="custom-slider__box-thumb no_img">
                                    <div class="custom-slider__default-img">
                                        <span class="box_svg">
                                            <svg xmlns="http://www.w3.org/2000/svg" width="40" height="40" viewBox="0 0 40 40" class="img_svg">
                                                <defs>
                                                    <path id="errorIconSvg" d="M18.5 27.5a1.5 1.5 0 1 1 3 0 1.5 1.5 0 0 1-3 0zM21 11h-2v13h2V11zm-1-9C10.059 2 2 10.059 2 20s8.059 18 18 18 18-8.059 18-18S29.941 2 20 2zm0 34c-8.837 0-16-7.163-16-16S11.163 4 20 4s16 7.163 16 16a16 16 0 0 1-16 16z"/>
                                                </defs>
                                                <g fill="none" fill-rule="evenodd">
                                                    <path d="M0 0h40v40H0z"/>
                                                    <use fill="#fff" fill-rule="nonzero" xlink:href="#errorIconSvg"/>
                                                </g>
                                            </svg>
                                        </span>
                                    </div>
                                </div>
                                <br>
                                <span class="txt_item"></span>
                            </a>
                        </div>
                    </div>
                </s_cover_item>
            </div>
            <div class="custom-slider__box-arrow">
                <button type="button" class="custom-slider__btn-arrow custom-slider__btn-prev">
                    <span class="box_svg">
                        <svg xmlns="http://www.w3.org/2000/svg" width="40" height="40" viewBox="0 0 40 40" class="img_svg">
                            <defs>
                                <path id="mainCategoryArrowLeft" d="M12 20L25 7l1.4 1.4L14.8 20l11.6 11.6L25 33z"/>
                            </defs>
                            <g fill="none" fill-rule="evenodd">
                                <path d="M0 0h40v40H0z"/>
                                <use fill="#fff" fill-rule="nonzero" xlink:href="#mainCategoryArrowLeft"/>
                            </g>
                        </svg>
                    </span>
                </button>
                <button type="button" class="custom-slider__btn-arrow custom-slider__btn-next">
                    <span class="box_svg">
                        <svg xmlns="http://www.w3.org/2000/svg" width="40" height="40" viewBox="0 0 40 40" class="img_svg">
                            <defs>
                                <path id="mainCategoryArrowRight" d="M28 20L15 33l-1.4-1.4L25.2 20 13.6 8.4 15 7z"/>
                            </defs>
                            <g fill="none" fill-rule="evenodd">
                                <path d="M0 0h40v40H0z"/>
                                <use fill="#fff" fill-rule="nonzero" xlink:href="#mainCategoryArrowRight"/>
                            </g>
                        </svg>
                    </span>
                </button>
            </div>
        </div>
    </div>

CSS ์ฝ”๋“œ

<style>
.custom-slider__wrap-scroller {
    overflow: hidden;
    position: relative;
    width: 100%;
}

.custom-slider__scroller {
    display: flex;
    transition: transform 0.5s ease-in-out;
    will-change: transform;
}

.custom-slider__item {
    flex: 0 0 auto;
    width: 300px; 
}

.custom-slider__box-arrow {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    display: flex;
    justify-content: space-between;
    width: 100%;
    padding: 0 10px;
    z-index: 10;
}

.custom-slider__btn-arrow {
    background: transparent;
    border: none;
    cursor: pointer;
    font-size: 0;
}

.custom-slider__btn-prev {
    position: absolute;
    left: 0;
}

.custom-slider__btn-next {
    position: absolute;
    right: 0;
}

.custom-slider__box-thumb {
    background-size: cover;
    background-position: center;
    width: 300px;
    height: 200px;
}

.custom-slider__box-thumb.no_img {
    display: flex;
    justify-content: center;
    align-items: center;
    background-color: #f0f0f0;
}

.custom-slider__default-img .box-svg {
    width: 40px;
    height: 40px;
}

.txt_item {
    color: white;
    margin-top: 20px;
    padding: 0 10px;
    text-align: center;
    overflow: hidden; 
    text-overflow: ellipsis; 
    white-space: nowrap;
    max-width: 100%; 
}

</style>

์Šคํฌ๋ฆฝํŠธ ์ฝ”๋“œ

<script>
window.addEventListener('load', function() {
    const items = document.querySelectorAll('.custom-slider__box-thumb');

    items.forEach(function(item) {
        const thumbnailUrl = item.getAttribute('data-thumbnail');
        if (thumbnailUrl) {
            item.style.backgroundImage = `url(${thumbnailUrl})`; 
        }
    });

    const scroller = document.querySelector('.custom-slider__scroller');
    const prevButton = document.querySelector('.custom-slider__btn-prev');
    const nextButton = document.querySelector('.custom-slider__btn-next');
    const totalItems = items.length;
    let currentIndex = 0;
    let autoSlideInterval;

    function moveToNextSlide() {
        if (currentIndex < totalItems - 1) {
            currentIndex++;
        } else {
            currentIndex = 0;
        }
        updateSlidePosition();
    }

    function moveToSlide(index) {
        currentIndex = index;
        updateSlidePosition();
    }

    function updateSlidePosition() {
        const offset = -currentIndex * 310;
        scroller.style.transform = `translateX(${offset}px)`;
    }

    prevButton.addEventListener('click', function() {
        clearInterval(autoSlideInterval);
        if (currentIndex > 0) {
            moveToSlide(currentIndex - 1);
        } else {
            moveToSlide(totalItems - 1);
        }
        startAutoSlide();
    });

    nextButton.addEventListener('click', function() {
        clearInterval(autoSlideInterval);
        if (currentIndex < totalItems - 1) {
            moveToSlide(currentIndex + 1);
        } else {
            moveToSlide(0);
        }
        startAutoSlide();
    });

    function startAutoSlide() {
        autoSlideInterval = setInterval(moveToNextSlide, 3000);
    }

    startAutoSlide();

    items.forEach(function(item) {
        const thumbnailUrl = item.getAttribute('data-thumbnail');
        if (thumbnailUrl) {
            const img = new Image();
            img.src = thumbnailUrl;
        }
    });
});
</script>

ํ‹ฐ์Šคํ† ๋ฆฌ ๋™์  ์ด๋ฏธ์ง€ ๋ฒ ๋„ˆ

๋ฐ˜์‘ํ˜•

'SEO' ์นดํ…Œ๊ณ ๋ฆฌ์˜ ๋‹ค๋ฅธ ๊ธ€

[ ํšจ๊ณผ์  ์ŠคํŒธ ๋Œ“๊ธ€ ๊ด€๋ฆฌ ] ๋ธ”๋กœ๊ทธ ๋Œ“๊ธ€์„ ์ž๋™์œผ๋กœ ์‚ญ์ œ ํ•˜๋Š” ๊ฐ„๋‹จํ•œ ๋ฐฉ๋ฒ•  (0) 2024.11.25
[ ๊ฒ€์ƒ‰ ์ตœ์ ํ™” SEO ] ๋ธ”๋กœ๊ทธ . ์‚ฌ์ดํŠธ ์ตœ์ ํ™” ํŒŒํŠธ๋„ˆ ๊ด‘๊ณ  ๋ฐ ์ƒํ’ˆ ๋งํฌ ์„ค์ • ๋ฐฉ๋ฒ•  (1) 2024.11.24
[ ๊ตฌ๊ธ€ ๊ฒ€์ƒ‰ ์—…๋ฐ์ดํŠธ ]2024๋…„ 11์›” ๊ตฌ๊ธ€ ์ฝ”์–ด ์•Œ๊ณ ๋ฆฌ์ฆ˜ ์—…๋ฐ์ดํŠธ ์ฃผ์š” ๋‚ด์šฉ๊ณผ ์˜ํ–ฅ ๋ถ„์„  (1) 2024.11.23
ํ‹ฐ์Šคํ† ๋ฆฌ ๋ธ”๋กœ๊ทธ 2์ฐจ ๋„๋ฉ”์ธ ์‚ฌ์šฉ์‹œ ๋Œ“๊ธ€ ์˜ค๋ฅ˜ ๋ฌธ์ œ ํ•ด๊ฒฐ ๋ฐฉ๋ฒ•  (1) 2024.11.20
ํ‹ฐ์Šคํ† ๋ฆฌ ๋ธ”๋กœ๊ทธ ์Šคํ‚จ ๊พธ๋ฏธ๊ธฐ ๋ธ”๋กœ๊ทธ ์ˆ˜์ •์— ์œ ์šฉํ•œ ์ฝ”๋“œ์™€ ํŒ ์ž๋ฃŒ ๋ชจ์Œ  (11) 2024.11.19
[ Bing ์ƒ‰์ธํ™” ์ตœ์ ํ™” ๋ฐฉ๋ฒ• ] ์‚ฌํŠธ๋งต ์ œ์ถœ๋ถ€ํ„ฐ ์ฝ˜ํ…์ธ  ์ตœ์ ํ™”๊นŒ์ง€  (1) 2024.11.18
HTML์˜ ๊ธฐ๋ณธ ๊ตฌ์กฐ์˜ ์ดํ•ด์™€ ๋ธ”๋กœ๊ทธ ์Šคํ‚จ ์ˆ˜์ • ๋ฐฉ๋ฒ• [ ๊ธฐ์ดˆ 1 ]  (1) 2024.11.16