½ÃÀÛÆäÀÌÁö·Î Áñ°Üã±âÃß°¡
·Î±×ÀÎ
ȸ¿ø°¡ÀÔ l Ã⼮üũ l ¸¶ÀÌÆäÀÌÁö l CGIMALL
·ÎµùµÇ±â Àü¿¡ ¾Ö´Ï¸ÞÀÌ¼Ç ±¸ÇöÇϱâ Skeleton loading using only a few lines of CSS : happycgi
ÀÚ·á½Ç »çÀÌÆ®µî·Ï ·©Å·100 ÇÁ·Î±×·¥¸®ºä °ü¸®ÀÚÃßõÀÚ·á Ãʺ¸°¡À̵å
Ä¿¹Â´ÏƼ
Àüü ÆîÃ帱â
Äü¸Þ´º¸µÅ© jquery , CSS , PHP , Javascript , ¹«·áÆùÆ® , ASP
»ó¼¼°Ë»ö
Ȩ > CSS > ±âŸȿ°ú > ·ÎµùµÇ±â Àü¿¡ ¾Ö´Ï¸ÞÀÌ¼Ç ±¸ÇöÇϱâ Skeleton loading using only a few lines of CSS »ó¼¼Á¤º¸
»çÀÌÆ®µî·Ï
Ŭ¶ó¿ìµåű×
javascript
HTML
PHP
2022
Api
CSS
À¥¸ÞÀÏ
jquery
ASP
°¶·¯¸®
mysql
¸ð¹ÙÀÏ
mobile
ÇöÀçÁ¢¼ÓÀÚ ¸í »õ·Î°íħ
·ÎµùµÇ±â Àü¿¡ ¾Ö´Ï¸ÞÀÌ¼Ç ±¸ÇöÇϱâ Skeleton loading using only a few lines of CSS
¼Ò½ºÅë°èÁ¤º¸ ¿À·ù½Å°í ¹× ¹®ÀÇ
ÇØÇÇÆÀ
³×ƼÁð
Æ®À§ÅÍ·Î º¸³»±â ÆäÀ̽ººÏÀ¸·Î º¸³»±â
¼Ò½ººÐ·ù ±âŸȿ°ú
´Ù¿î·Îµå Ƚ¼ö 4 ȸ
°£´Ü¼³¸í ·ÎµùµÇ±â Àü¿¡ È­¸éÀÇ ºó ¿µ¿ªÀ» ÀÚ¿¬½º·´°Ô º¸¿©ÁÖ´Â ½ºÄÌ·¹Åæ ·Îµù ¾Ö´Ï¸ÞÀÌ¼Ç CSSÀÔ´Ï´Ù. °£´ÜÇÑ Äڵ常À¸·Îµµ ÄÁÅÙÃ÷ ·Îµù ÀüÀÇ ±ôºýÀÓÀ» ÁÙ¿©ÁÖ°í, »ç¿ëÀÚ °æÇèÀ» ´õ ºÎµå·´°Ô ¸¸µé¾î ÁÝ´Ï´Ù.
Æò°¡Çϱâ ÈǸ¢ÇÔ ¸Å¿ìÁÁÀ½ ÁÁÀ½ ±¦ÂúÀ½ º¸Åë º°·Î
ȨÆäÀÌÁö¹Ù·Î°¡±â ¼Ò½º´Ù¿î·Îµå µ¥¸ð ¹Ì¸®º¸±â ½ºÅ©·¦Çϱâ
 

·ÎµùµÇ±â Àü¿¡ È­¸éÀÇ ºó ¿µ¿ªÀ» ÀÚ¿¬½º·´°Ô º¸¿©ÁÖ´Â ½ºÄÌ·¹Åæ ·Îµù ¾Ö´Ï¸ÞÀÌ¼Ç CSSÀÔ´Ï´Ù.

°£´ÜÇÑ Äڵ常À¸·Îµµ ÄÁÅÙÃ÷ ·Îµù ÀüÀÇ ±ôºýÀÓÀ» ÁÙ¿©ÁÖ°í, »ç¿ëÀÚ °æÇèÀ» ´õ ºÎµå·´°Ô ¸¸µé¾î ÁÝ´Ï´Ù.


HTML ±¸Á¶

<div class="container">

<!-- code here -->

<div class="card">

<div class="card-img skeleton">

<!-- waiting for img to load from javascript -->

</div>

<div class="card-body">

<h2 class="card-title skeleton">

<!-- wating for title to load from javascript -->

</h2>

<p class="card-intro skeleton">

<!-- waiting for intro to load from Javascript -->

</p>

</div>

</div>

<div class="card">

<div class="card-img">

<img src="https://assets.codepen.io/285131/uslmOwQpdRRUwr6AmBP6JdzeHjS.jpg" />

</div>

<div class="card-body">

<h2 class="card-title">

Drive (2011)

</h2>

<p class="card-intro">

Driver is a skilled Hollywood stuntman who moonlights as a getaway driv...

</p>

</div>

</div>

</div>



CSS(SCSS) ¼Ò½º

*, *:after, *:before {

box-sizing: border-box;

}


body {

font-family: "Inter", sans-serif;

background-color: #f2f5f7;

}


// THE CARD 

.card {

display: flex;

flex-direction: column;

flex-basis: 300px;

flex-shrink: 0;

flex-grow: 0;

max-width: 100%;

background-color: #FFF;

box-shadow: 0 5px 10px 0 rgba(#000, .15);

border-radius: 10px;

overflow: hidden;

margin: 1rem;

}


.card-img {

padding-bottom: 56.25%;

position: relative;

img {

position: absolute;

width: 100%;

}

}


.card-body {

padding: 1.5rem;

}


.card-title {

font-size: 1.25rem;

line-height: 1.33;

font-weight: 700;

&.skeleton { // NOTICE THIS

min-height: 28px;

border-radius: 4px;

}

}


.card-intro {

margin-top: .75rem;

line-height: 1.5;

&.skeleton { // NOTICE THIS

min-height: 72px;

border-radius: 4px;

}

}


// THE LOADING EFFECT

.skeleton {

background-color: #e2e5e7;

// The shine that's going to move across the skeleton:

background-image:

linear-gradient(

90deg, 

rgba(#fff, 0), 

rgba(#fff, 0.5),

rgba(#fff, 0)

);

background-size: 40px 100%; // width of the shine

background-repeat: no-repeat; // No need to repeat the shine effect

background-position: left -40px top 0; // Place shine on the left side, with offset on the left based on the width of the shine - see background-size

animation: shine 1s ease infinite; // increase animation time to see effect in 'slow-mo'

}


@keyframes shine {

to {

// Move shine from left to right, with offset on the right based on the width of the shine - see background-size

background-position: right -40px top 0;

}

}



// Codepen spesific styling - only to center the elements in the pen preview and viewport 

.container {

position: absolute;

top: 0;

left: 0;

right: 0;

bottom: 0;

width: 100%;

display: flex;

align-items: center;

justify-content: center;

flex-wrap: wrap;

}

// End Codepen spesific styling

 

÷ºÎÆÄÀÏÀ» ´Ù¿î·ÎµåÇϰųª ÇØ´ç »çÀÌÆ®·Î À̵¿ÇÏ¿© Àüü ¼Ò½º¸¦ È®ÀÎÇÏ½Ç ¼ö ÀÖ½À´Ï´Ù.


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