Created
          October 29, 2015 12:28 
        
      - 
      
 - 
        
Save anonymous/48ac99086c888879f21d to your computer and use it in GitHub Desktop.  
    JS Bin // source https://jsbin.com/wepaci
  
        
  
    
      This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
      Learn more about bidirectional Unicode characters
    
  
  
    
  | <!DOCTYPE html> | |
| <html> | |
| <head> | |
| <script src="https://code.jquery.com/jquery-2.1.4.js"></script> | |
| <meta charset="utf-8"> | |
| <title>JS Bin</title> | |
| <style id="jsbin-css"> | |
| body { | |
| background:#aaa; | |
| } | |
| .selectbox { | |
| background: #fff; | |
| border:1px solid #ccc; | |
| position: relative; | |
| } | |
| .selectbox_toggle { | |
| padding: 5px; | |
| } | |
| .selectbox__arrow { | |
| position:absolute; | |
| right:8px; | |
| top : 10px; | |
| width: 0; | |
| height: 0; | |
| border-style: solid; | |
| border-width: 5px 6px 0 6px; | |
| border-color: #727578 transparent transparent transparent; | |
| -webkit-transform:rotate(360deg); | |
| } | |
| .selectbox_itemlist { | |
| /* display:none; */ | |
| position: absolute; | |
| top:100%; | |
| width:100% | |
| } | |
| .selectbox__item { | |
| display:block; | |
| padding:5px 5px; | |
| background:#fbfbfb; | |
| border-bottom:1px solid #ddd; | |
| } | |
| .selectbox__item:first-child { | |
| border-bottom:1px solid #ddd; | |
| } | |
| </style> | |
| </head> | |
| <body> | |
| <div class="selectbox"> | |
| <div class="selectbox_toggle"> | |
| All items <span class="selectbox__arrow"></span> | |
| </div> | |
| <div class="selectbox_itemlist"> | |
| <span class="selectbox__item" data-value="Item 1">Item 1</span> | |
| <span class="selectbox__item" data-value="Item 2">Item 2</span> | |
| </div> | |
| </div> | |
| <script id="jsbin-source-css" type="text/css">body { | |
| background:#aaa; | |
| } | |
| .selectbox { | |
| background: #fff; | |
| border:1px solid #ccc; | |
| position: relative; | |
| } | |
| .selectbox_toggle { | |
| padding: 5px; | |
| } | |
| .selectbox__arrow { | |
| position:absolute; | |
| right:8px; | |
| top : 10px; | |
| width: 0; | |
| height: 0; | |
| border-style: solid; | |
| border-width: 5px 6px 0 6px; | |
| border-color: #727578 transparent transparent transparent; | |
| -webkit-transform:rotate(360deg); | |
| } | |
| .selectbox_itemlist { | |
| /* display:none; */ | |
| position: absolute; | |
| top:100%; | |
| width:100% | |
| } | |
| .selectbox__item { | |
| display:block; | |
| padding:5px 5px; | |
| background:#fbfbfb; | |
| border-bottom:1px solid #ddd; | |
| } | |
| .selectbox__item:first-child { | |
| border-bottom:1px solid #ddd; | |
| }</script> | |
| </body> | |
| </html> | 
  
    
      This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
      Learn more about bidirectional Unicode characters
    
  
  
    
  | body { | |
| background:#aaa; | |
| } | |
| .selectbox { | |
| background: #fff; | |
| border:1px solid #ccc; | |
| position: relative; | |
| } | |
| .selectbox_toggle { | |
| padding: 5px; | |
| } | |
| .selectbox__arrow { | |
| position:absolute; | |
| right:8px; | |
| top : 10px; | |
| width: 0; | |
| height: 0; | |
| border-style: solid; | |
| border-width: 5px 6px 0 6px; | |
| border-color: #727578 transparent transparent transparent; | |
| -webkit-transform:rotate(360deg); | |
| } | |
| .selectbox_itemlist { | |
| /* display:none; */ | |
| position: absolute; | |
| top:100%; | |
| width:100% | |
| } | |
| .selectbox__item { | |
| display:block; | |
| padding:5px 5px; | |
| background:#fbfbfb; | |
| border-bottom:1px solid #ddd; | |
| } | |
| .selectbox__item:first-child { | |
| border-bottom:1px solid #ddd; | |
| } | 
  
    Sign up for free
    to join this conversation on GitHub.
    Already have an account?
    Sign in to comment