Pen Settings

HTML

CSS

CSS Base

Vendor Prefixing

Add External Stylesheets/Pens

Any URL's added here will be added as <link>s in order, and before the CSS in the editor. If you link to another Pen, it will include the CSS from that Pen. If the preprocessor matches, it will attempt to combine them before processing.

+ add another resource

JavaScript

Babel includes JSX processing.

Add External Scripts/Pens

Any URL's added here will be added as <script>s in order, and run before the JavaScript in the editor. You can use the URL of any other Pen and it will include the JavaScript from that Pen.

+ add another resource

Packages

Add Packages

Search for and use JavaScript packages from npm here. By selecting a package, an import statement will be added to the top of the JavaScript editor for this package.

Behavior

Save Automatically?

If active, Pens will autosave every 30 seconds after being saved once.

Auto-Updating Preview

If enabled, the preview panel updates automatically as you code. If disabled, use the "Run" button to update.

Format on Save

If enabled, your code will be formatted when you actively save your Pen. Note: your code becomes un-folded during formatting.

Editor Settings

Code Indentation

Want to change your Syntax Highlighting theme, Fonts and more?

Visit your global Editor Settings.

HTML

              
                
<div id="menF">
	

<select id="">
    <option value="hide">Par Genre</option>
    <option value="2010">Action</option>
    <option value="2011">Amour</option>
    <option value="2013">Animation</option>
    <option value="2012">Arts Martiaux</option>
    <option value="2014">Aventure</option>
    <option value="2015">Comédie</option>
    <option value="2015">Divers</option>
    <option value="2015">Documentaire</option>
    <option value="2015">Drâme</option>
    <option value="2015">Érotique</option>
    <option value="2015">Famille</option>
    <option value="2015">Fantastique</option>
    <option value="2015">Guerre</option>
    <option value="2015">Historique</option>
    <option value="2015">Horreur</option>
    <option value="2015">Policier</option>
    <option value="2015">Science Fiction</option>
    <option value="2015">Sport</option>
    <option value="2015">Triller</option>
    <option value="2015">Western</option>
</select>
	
	
<select id="year">
    <option value="hide">Par Année</option>
	<option value="2016">2016</option>
	<option value="2015">2015</option>
	<option value="2014">2014</option>
	<option value="2013">2013</option>
	<option value="2012">2012</option>
	<option value="2011">2011</option>
	<option value="2010">2010</option>
	<option value="2009">2009</option>
	<option value="2008">2008</option>
	<option value="2007">2007</option>
	<option value="2006">2006</option>
	<option value="2005">2005</option>
	<option value="2004">2004</option>
	<option value="2003">2003</option>
	<option value="2002">2002</option>
	<option value="2001">2001</option>
	<option value="2000">2000</option>
	<option value="1999">1999</option>
	<option value="1998">1998</option>
	<option value="1997">1997</option>
	<option value="1996">1996</option>
	<option value="1995">1995</option>
	<option value="1994">1994</option>
	<option value="1993">1993</option>
	<option value="1992">1992</option>
	<option value="1991">1991</option>
	<option value="1990">1990</option>
	<option value="1989">1989</option>
	<option value="1988">1988</option>
	<option value="1987">1987</option>
	<option value="1986">1986</option>
	<option value="1985">1985</option>
	<option value="1984">1984</option>
	<option value="1983">1983</option>
	<option value="1982">1982</option>
	<option value="1981">1981</option>
</select>
	
	
<select id="">
    <option value="hide">Par Nationalité</option>
    <option value="2010">Allemand</option>
    <option value="2011">Américain</option>
    <option value="2011">Australien</option>
    <option value="2011">Belge</option>
    <option value="2012">Britannique</option>
    <option value="2013">Canadien</option>
    <option value="2013">Danois</option>
    <option value="2011">Espagnol</option>
    <option value="2014">Français</option>
    <option value="2015">Indien</option>
    <option value="2015">Irlandais</option>
    <option value="2015">Islandais</option>
    <option value="2011">Italien</option>
    <option value="2015">Japonais</option>
    <option value="2015">Méxicain</option>
    <option value="2011">Russe</option>
    <option value="2011">Sud-Africain</option>
    <option value="2011">Sud-Coréen</option>
    <option value="2011">Suédois</option>
    <option value="2015">Suisse</option>
</select>
	
<select>
    <option>Derniers ajouts</option>
    <option value="2011">Date de sortie</option>
    <option value="2012">Popularité</option>
    <option value="2013">Note</option>
    <option value="2014">Budget</option>
</select>
	
	
</div>
	
              
            
!

CSS

              
                /* Initialisation */
html,body{
	display:block;
	width:100%;
	height:100%;
	-webkit-box-sizing:border-box;
  box-sizing:border-box;
  font-family:"Quicksand","Open Sans",sans-serif;
}
html{	background:url(//vincentrocher.fr/codepen/images/backgrounds/blur-1.jpg) no-repeat;
	background-size:cover;
}


#menF{
	width:100%;
	background: rgba(50, 50, 50, 0.8);
	position:fixed;
	top:0px;
  left:0;
	z-index:5;
  box-shadow: 0 0 15px -2px #141414;
	text-align:center;
  font-family:"Quicksand","Open Sans",sans-serif;
  padding-bottom:8px;
}



.select-hidden {
  display: none;
  visibility: hidden;
  padding-right: 10px;
}
.select {
  cursor: pointer;
  display: inline-block;
  position: relative;
  font-size: 14px;
  color: #fff;
  width: 170px;
  height: 30px;
  line-height: 31px;
  text-align:left;
  margin-top:10px;
}
.btnSelect {
  position: absolute; 
  top:0;right:0;bottom:0;left:0;
  background-color: rgba(20,20,20, 0.8);
  padding: 0 15px;
  margin:0 2px -2px 2px;
  transition: all 0.2s ease-in;
  box-shadow: 0 0 5px -2px rgba(20,20,20, 0.8);
}
.btnSelect:after {
    content:"";
    width: 0;
    height: 0;
    border: 7px solid transparent;
    border-color: #FFF transparent transparent transparent;
    position: absolute;
    top: 12px;
    right: 10px;
 }

.btnSelect:active,
.btnSelect:hover,
.active { background-color: rgba(0,0,0, 0.8); }

.btnSelect:active,
.active:after{  top: 5px;  border-color: transparent transparent #fff transparent; }

.listSelect {
  display: none; 
  position: absolute;
  top: 100%;
  right: 0;
  left: 0;
  z-index: 999;
  margin: 0;
  padding: 0;
  font-size: 15px;
  list-style: none;
  background-color: rgba(40,40,40, 0.95);
  box-shadow: 0 0 15px -2px #141414;
  max-height: 700px;
  overflow-y: scroll;
  overflow-x: hidden;
}
.listSelect li{
    margin: 0;
    text-indent: 15px;
    border-top: 1px solid rgba(0,0,0, 0.8);
    transition:all 0.2s ease-in;
}
.listSelect .listSelect, .listSelect li:hover{
      background: rgba(150,150,150, 0.4);
}
              
            
!

JS

              
                $('select').each(function(){
  
    var $this = $(this), numberOfOptions = $(this).children('option').length;
  
    $this.addClass('select-hidden'); // On masque le select
    $this.wrap('<div class="select"></div>'); // On créer une div parrent 
    $this.after('<div class="btnSelect"></div>'); // On ajoute le bouton

    var $styledSelect = $this.next('.btnSelect'); // Var bouton
    $styledSelect.text($this.children('option').eq(0).text()); // On insere le text du premier select
  
    var $list = $('<ul />', { 'class': 'listSelect' }).insertAfter($styledSelect); // On insert la liste
    for (var i = 0; i < numberOfOptions; i++) {
        $('<li />', {
            text: $this.children('option').eq(i).text(),
            rel: $this.children('option').eq(i).val(),
            class: $this.children('option').eq(i).attr('class')
        }).appendTo($list);
    }
    var $listItems = $list.children('li');
	
	
	// Au clic sur le bouton liste
    $styledSelect.click(function(e) {
        e.stopPropagation();
        $('.btnSelect.active').not(this).each(function(){ // On ferme les listes ouvertes
            $(this).removeClass('active').next('.listSelect').hide();
        });
        $(this).toggleClass('active').next('.listSelect').toggle(); // On active le bouton et deroule la liste
    });
  
	// Au clic sur un element de la liste
    $listItems.click(function(e) {
        e.stopPropagation();
        $styledSelect.text($(this).text()).removeClass('active'); // On change le titre par celui cliqué
  	    $(this).addClass('click');
        $this.val($(this).attr('rel')); // On recupere la valeur de l'element
        $list.hide(); // on ferme la liste
    });
  
	// Au clic en dehors de la liste
	$(document).click(function() {
        $styledSelect.removeClass('active');
        $list.hide();
    });

});
              
            
!
999px

Console