½ÃÀÛÆäÀÌÁö·Î Áñ°Üã±âÃß°¡
·Î±×ÀÎ
ȸ¿ø°¡ÀÔ l Ã⼮üũ l ¸¶ÀÌÆäÀÌÁö l CGIMALL
Space Facts Card Carousel : happycgi
ÀÚ·á½Ç »çÀÌÆ®µî·Ï ·©Å·100 ÇÁ·Î±×·¥¸®ºä °ü¸®ÀÚÃßõÀÚ·á Ãʺ¸°¡À̵å
Ä¿¹Â´ÏƼ
Àüü ÆîÃ帱â
Äü¸Þ´º¸µÅ© jquery , CSS , PHP , Javascript , ¹«·áÆùÆ® , ASP
»ó¼¼°Ë»ö
Ȩ > CSS > ±âº» ¼Ò½º > Space Facts Card Carousel »ó¼¼Á¤º¸
»çÀÌÆ®µî·Ï
Ŭ¶ó¿ìµåű×
Javascript
HTML
PHP
CSS
ASP
API
mysql
jquery
image
slide
Mobile
¸Þ´º
°Ô½ÃÆÇ
ÇöÀçÁ¢¼ÓÀÚ ¸í »õ·Î°íħ
Space Facts Card Carousel
¼Ò½ºÅë°èÁ¤º¸ ¿À·ù½Å°í ¹× ¹®ÀÇ
ÇØÇÇÆÀ
³×ƼÁð
Æ®À§ÅÍ·Î º¸³»±â ÆäÀ̽ººÏÀ¸·Î º¸³»±â
¼Ò½ººÐ·ù ±âº» ¼Ò½º
´Ù¿î·Îµå Ƚ¼ö 11 ȸ
°£´Ü¼³¸í Á¤º¸¼½¼ÇÀ» Ä«µå ÇüÅ·Πº¸¿©ÁÖ°í, Á¿ì·Î ³Ñ±â¸ç Ž»öÇÒ ¼ö ÀÖ´Â ÀÎÅÍ·¢Æ¼ºêÇÑ Ä³·¯¼¿ UI ¿¹Á¦ÀÔ´Ï´Ù.
Æò°¡Çϱâ ÈǸ¢ÇÔ ¸Å¿ìÁÁÀ½ ÁÁÀ½ ±¦ÂúÀ½ º¸Åë º°·Î
ȨÆäÀÌÁö¹Ù·Î°¡±â ¼Ò½º´Ù¿î·Îµå µ¥¸ð ¹Ì¸®º¸±â ½ºÅ©·¦Çϱâ

Á¤º¸¼½¼ÇÀ» Ä«µå ÇüÅ·Πº¸¿©ÁÖ°í, Á¿ì·Î ³Ñ±â¸ç Ž»öÇÒ ¼ö ÀÖ´Â ÀÎÅÍ·¢Æ¼ºêÇÑ Ä³·¯¼¿ UI ¿¹Á¦ÀÔ´Ï´Ù.

Flexbox¿Í CSS TransformÀ» Ȱ¿ëÇØ °¡·Î·Î ½ºÅ©·Ñ °¡´ÉÇÑ Ä«µå ij·¯¼¿À» ±¸ÇöÇϸç, °¢ Ä«µå´Â À̹ÌÁö¿Í Á¤º¸¸¦ ´ã°í ÀÖ½À´Ï´Ù. »ç¿ëÀÚ´Â ¸¶¿ì½º µå·¡±×³ª ½ºÅ©·Ñ·Î ºÎµå·´°Ô Ä«µå¸¦ ³Ñ±æ ¼ö ÀÖ°í, CSS Transition°ú 3D Transform È¿°ú·Î Ä«µå¿¡ ÀÔüÀûÀÎ ¿òÁ÷ÀÓ°ú ±íÀ̰¨À» ´õÇØ ½Ã°¢ÀûÀ¸·Î ¸Å·ÂÀûÀÎ ÀÎÅÍ·¢¼ÇÀ» Á¦°øÇÕ´Ï´Ù. Ä«µå °¢°¢Àº À̹ÌÁö, Á¦¸ñ, ¼³¸í ÅØ½ºÆ®·Î ±¸¼ºµÇ¾î Á¤º¸ Àü´Þ°ú µðÀÚÀÎ ¸ðµÎ¸¦ ¸¸Á·½Ã۸ç, ¼ø¼ö CSS¿Í ¾à°£ÀÇ JavaScript·Î Á¦À۵Ǿî À¥¿¡¼­ °¡º±°í ¸Å²ô·´°Ô ÀÛµ¿ÇÕ´Ï´Ù. ÀÌ ¿¹Á¦´Â Æ÷Æ®Æú¸®¿À³ª Á¤º¸¼º À¥»çÀÌÆ®¿¡ Ȱ¿ëÇϱâ ÁÁÀ¸¸ç, FlexboxÀÇ ·¹À̾ƿô ´É·Â°ú CSS ¾Ö´Ï¸ÞÀÌ¼Ç ±â¹ýÀ» ¹è¿ì±â¿¡ À¯¿ëÇÑ ÀÚ·áÀÔ´Ï´Ù..

HTML ±¸Á¶

<div class="slider">

<div class="item">

<h1>Space Fact 1</h1>

Jupiter protects Earth - its gravity acts like a cosmic shield, deflecting comets and asteroids.🌠

</div>

<div class="item">

<h1>Space Fact 2</h1>

Stars "beat" like hearts - they pulsate, expanding and contracting as they burn fuel.⭐

</div>

<div class="item">

<h1>Space Fact 3</h1>

Galaxies can "eat" each other - the Milky Way is currently consuming the Sagittarius Dwarf Galaxy.🌌

</div>

<div class="item ">

<h1>Space Fact 4</h1>

Space smells like seared steak - astronauts describe a metallic/grilled odor after spacewalks.👩‍🚀

</div>

<div class="item ">

<h1>Space Fact 5</h1>

Astronauts grow taller in space - spines stretch up to 2 inches without gravity's compression.🚀

</div>

<div class="item ">

<h1>Space Fact 6</h1>

Space has its own "internet" - neutron stars beam signals like cosmic radio towers.🪐

</div>

<div class="item ">

<h1>Space Fact 7</h1>

There's an alcohol cloud in space - in Aquila, containing enough ethanol for 400 septillion drinks.🍷

</div>

<div class="item ">

<h1>Space Fact 8</h1>

Your body contains stardust - atoms of heavy elements like calcium were forged in supernovae.✨

</div>

<div class="item ">

<h1>Space Fact 9</h1>

Black holes can "sing" - they create sound waves when consuming matter, but humans can't hear them.🎤

</div>

<button id="next">&gt;</button>

<button id="prev">&lt;</button>

</div>



CSS ¼Ò½º

body {

background-image: url(https://i.postimg.cc/Gtcs55SP/photo-1506318137071-a8e063b4bec0.avif);

min-height: 100vh;

margin: 0;

display: flex;

justify-content: center;

align-items: center;

font-family: monospace;

}

.slider {

position: relative;

margin-top: 100px;

width: 100%;

height: 370px;

overflow: hidden;

}

.item {

position: absolute;

width: 200px;

height: 320px;

text-align: justify;

background-color: #fff;

border-radius: 10px;

padding: 20px;

transition: 0.5s;

left: calc(50% - 110px);

top: 0;

}

#next {

position: absolute;

right: 50px;

top: 40%;

}

#prev {

position: absolute;

left: 50px;

top: 40%;

}

#prev,

#next {

color: #fff;

background: none;

border: none;

font-size: xxx-large;

font-family: monospace;

font-weight: bold;

opacity: 0.5;

transition: opacity 0.5s;

}

#prev:hover,

#next:hover {

opacity: 1;

}

 


JS ¼Ò½º

let items = document.querySelectorAll(".slider .item");

let active = 3;

function loadShow() {

items[active].style.transform = `none`;

items[active].style.zIndex = 1;

items[active].style.filter = "none";

items[active].style.opacity = 1;

// show after

let stt = 0;

for (var i = active + 1; i < items.length; i++) {

stt++;

items[i].style.transform = `translateX(${120 * stt}px) scale(${

1 - 0.2 * stt

}) perspective(16px) rotateY(-1deg)`;

items[i].style.zIndex = -stt;

items[i].style.filter = "blur(5px)";

items[i].style.opacity = stt > 2 ? 0 : 0.6;

}

stt = 0;

for (var i = active - 1; i >= 0; i--) {

stt++;

items[i].style.transform = `translateX(${-120 * stt}px) scale(${

1 - 0.2 * stt

}) perspective(16px) rotateY(1deg)`;

items[i].style.zIndex = -stt;

items[i].style.filter = "blur(5px)";

items[i].style.opacity = stt > 2 ? 0 : 0.6;

}

}

loadShow();

let next = document.getElementById("next");

let prev = document.getElementById("prev");

next.onclick = function () {

active = active + 1 < items.length ? active + 1 : active;

loadShow();

};

prev.onclick = function () {

active = active - 1 >= 0 ? active - 1 : active;

loadShow();

};

 

 

³×ƼÁð ÀÇ°ß   ÀÌ¿ëÇϽŠÀÚ·áÀÇ Èı⸦ ÀÚÀ¯·Ó°Ô ÀÛ¼ºÇϼ¼¿ä. (»ó¾÷ÀûÀÎ ±¤°í ¹× µµ¹è¼º ±Û µîÀº »çÀüÅ뺸¾øÀÌ »èÁ¦µÉ ¼ö ÀÖ½À´Ï´Ù.)
³»¿ë ¾ÆÀ̵ð Àǰ߳²±â±â
µî·ÏµÈ ÀǰßÀÌ ¾ø½À´Ï´Ù.
1
À̸§
³»¿ë
:³×¸Â¾Æ¿ä: :È­³ª´Â±º¿ä: :Àá¿Í: :¿ì¿ïÇØ: :À̰ǾƳÄ: :¿ÕÇÏÇÏ: ¿Õ¿ôÀ½~ ³î·¥~
Æò°¡Çϱâ ÈǸ¢ÇÔ ¸Å¿ìÁÁÀ½ ÁÁÀ½ ±¦ÂúÀ½ º¸Åë º°·Î
µµ¹è¹æÁöŰ
 87152666 º¸ÀÌ´Â µµ¹è¹æÁö۸¦ ÀÔ·ÂÇϼ¼¿ä.