½ÃÀÛÆäÀÌÁö·Î Áñ°Üã±âÃß°¡
·Î±×ÀÎ
ȸ¿ø°¡ÀÔ l Ã⼮üũ l ¸¶ÀÌÆäÀÌÁö l CGIMALL
happycgi
ÀÚ·á½Ç »çÀÌÆ®µî·Ï ·©Å·100 ÇÁ·Î±×·¥¸®ºä °ü¸®ÀÚÃßõÀÚ·á Ãʺ¸°¡À̵å
Ä¿¹Â´ÏƼ
Àüü ÆîÃ帱â
Äü¸Þ´º¸µÅ© jquery , CSS , PHP , Javascript , ¹«·áÆùÆ® , ASP
»ó¼¼°Ë»ö
Ȩ > CSS > ¸Þ´º > ¼±Åà ¸Þ´º¸¦ µû¶ó´Ù´Ï´Â µå·Ó´Ù¿î ¸Þ´º Pure CSS Select Box With Direction Aware Hover Effect »ó¼¼Á¤º¸
»çÀÌÆ®µî·Ï
Ŭ¶ó¿ìµåű×
Javascript
php
asp
CSS
html
mysql
jquery
image
Mobile
API
slide
°Ô½ÃÆÇ
¸Þ´º
ÇöÀçÁ¢¼ÓÀÚ ¸í »õ·Î°íħ
¼±Åà ¸Þ´º¸¦ µû¶ó´Ù´Ï´Â µå·Ó´Ù¿î ¸Þ´º Pure CSS Select Box With Direction Aware Hover Effect
¼Ò½ºÅë°èÁ¤º¸ ¿À·ù½Å°í ¹× ¹®ÀÇ
ÇØÇÇÆÀ
³×ƼÁð
Æ®À§ÅÍ·Î º¸³»±â ÆäÀ̽ººÏÀ¸·Î º¸³»±â
¼Ò½ººÐ·ù ¸Þ´º
´Ù¿î·Îµå Ƚ¼ö 0 ȸ
°£´Ü¼³¸í ¼±ÅÃÇÑ ¸Þ´º¸¦ À¯ÁöÇÏ°í µû¶óµð³ª´Â µå·Ó´Ù¿î ¸Þ´ºÀÔ´Ï´Ù.
Æò°¡Çϱâ ÈǸ¢ÇÔ ¸Å¿ìÁÁÀ½ ÁÁÀ½ ±¦ÂúÀ½ º¸Åë º°·Î
ȨÆäÀÌÁö¹Ù·Î°¡±â ¼Ò½º´Ù¿î·Îµå µ¥¸ð ¹Ì¸®º¸±â ½ºÅ©·¦Çϱâ
 

¸Þ´º¸¦ ¼±ÅÃÇÏ¸é ¼±ÅÃµÈ »óÅ·Πµû¶ó´Ù´Ï´Â µå·Ó´Ù¿î ¸Þ´ºÀÔ´Ï´Ù.
È°¿ëµµ°¡ ³ô¾Æ ´Ù¾çÇÑ »çÀÌÆ®¿¡¼­ »ç¿ë °¡´ÉÇÕ´Ï´Ù.




HTML ±¸Á¶

<div id="info">

  Observe the platform icon's motion direction when there is up and down

  hover on options.

</div>


<form>

  <input type="checkbox" id="options-checkbox-btn" />

  <div id="select-btn" class="fx fx-justify-between">

    <div id="selected-value">

      <span>Select a platform</span>

    </div>

    <div id="chevrons">

      <i class="fas fa-chevron-up"></i>

      <i class="fas fa-chevron-down"></i>

    </div>

  </div>

  <div id="options">

    <div class="option">

      <input class="option-radio-btn top" type="radio" name="platform" value="codepen" />

      <input class="option-radio-btn bottom" type="radio" name="platform" value="codepen" />

      <i class="fab fa-codepen"></i>

      <span class="option-label">CodePen</span>

      <span class="option-value">CodePen</span>

    </div>

    <div class="option">

      <input class="option-radio-btn top" type="radio" name="platform" value="dribbble" />

      <input class="option-radio-btn bottom" type="radio" name="platform" value="dribbble" />

      <i class="fab fa-dribbble"></i>

      <span class="option-label">Dribbble</span>

      <span class="option-value">Dribbble</span>

    </div>

    <div class="option">

      <input class="option-radio-btn top" type="radio" name="platform" value="behance" />

      <input class="option-radio-btn bottom" type="radio" name="platform" value="behance" />

      <i class="fab fa-behance"></i>

      <span class="option-label">Behance</span>

      <span class="option-value">Behance</span>

    </div>

    <div class="option">

      <input class="option-radio-btn top" type="radio" name="platform" value="hackerrank" />

      <input class="option-radio-btn bottom" type="radio" name="platform" value="hackerrank" />

      <i class="fab fa-hackerrank"></i>

      <span class="option-label">HackerRank</span>

      <span class="option-value">HackerRank</span>

    </div>

    <div class="option">

      <input class="option-radio-btn top" type="radio" name="platform" value="stackoverflow" />

      <input class="option-radio-btn bottom" type="radio" name="platform" value="stackoverflow" />

      <i class="fab fa-stack-overflow"></i>

      <span class="option-label">StackOverflow</span>

      <span class="option-value">StackOverflow</span>

    </div>

    <div class="option">

      <input class="option-radio-btn top" type="radio" name="platform" value="freecodecamp" />

      <input class="option-radio-btn bottom" type="radio" name="platform" value="freecodecamp" />

      <i class="fab fa-free-code-camp"></i>

      <span class="option-label">FreeCodeCamp</span>

      <span class="option-value">FreeCodeCamp</span>

    </div>

    <div id="option-bg"></div>

  </div>

</form>



CSS ¼Ò½º

* {

  user-select: none;

}


*:focus {

  outline: none;

}


html,

body {

  height: 100%;

  min-height: 100%;

}


body {

  font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto,

    Oxygen, Ubuntu, Cantarell, "Open Sans", "Helvetica Neue", sans-serif;

  padding-bottom: 100px;

  margin: 0;

  background-color: #ebf3f3;

}


.fx {

  display: flex;

}


.fx-justify-between {

  justify-content: space-between;

}


#info {

  position: absolute;

  top: 0;

  right: 0;

  left: 0;

  color: #2d3667;

  font-size: 16px;

  text-align: center;

  padding: 14px;

  background-color: #f3f9f9;

}


form {

  position: absolute;

  top: 0;

  right: 0;

  left: 0;

  width: 300px;

  height: 42px;

  margin: 100px auto 0 auto;

  z-index: 1;

}


#select-btn {

  position: relative;

  height: 16px;

  padding: 12px 14px;

  background-color: #fff;

  border-radius: 4px;

  cursor: pointer;

  border: 1px solid #e2eded;

  border-color: #eaf1f1 #e4eded #dbe7e7 #e4eded;

}


#options-checkbox-btn {

  position: absolute;

  top: 0;

  right: 0;

  bottom: 0;

  left: 0;

  width: 100%;

  height: 100%;

  margin: 0;

  opacity: 0;

  cursor: pointer;

  z-index: 3;

}


#selected-value {

  font-size: 16px;

  line-height: 1;

  margin-right: 26px;

}


.option i {

  width: 16px;

  height: 16px;

}


.option,

.option-label {

  color: #2d3667;

  font-size: 16px;

}


#chevrons i {

  display: block;

  height: 50%;

  color: #d1dede;

  font-size: 12px;

}


#options-checkbox-btn:checked + #select-btn #chevrons i {

  color: #2d3667;

}


.options {

  position: absolute;

  left: 0;

  width: 250px;

}


#options {

  position: absolute;

  top: 42px;

  right: 0;

  left: 0;

  width: 298px;

  margin: 0 auto;

  background-color: #fff;

  border-radius: 4px;

}


#options-checkbox-btn:checked ~ #options {

  border: 1px solid #e2eded;

  border-color: #eaf1f1 #e4eded #dbe7e7 #e4eded;

}


.option {

  position: relative;

  line-height: 1;

  transition: 0.3s ease all;

  z-index: 2;

}


.option i {

  position: absolute;

  left: 14px;

  padding: 0;

  display: none;

}


#options-checkbox-btn:checked ~ #options .option i {

  display: block;

  padding: 12px 0;

}


.option-label {

  display: none;

  padding: 0;

  margin-left: 27px;

}


#options-checkbox-btn:checked ~ #options .option-label {

  display: block;

  padding: 12px 14px;

}


.option-radio-btn {

  position: absolute;

  left: 0;

  width: 100%;

  height: 50%;

}


.option-radio-btn.top {

  top: 0;

}


.option-radio-btn.bottom {

  bottom: 0;

}


.
.
.




 

 

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