LOADING...

Preview

Pen ID
Unlock Campus Themeforest adv

 

Code
CSS
@import url(https://fonts.googleapis.com/css?family=Exo:400,500,700,700italic);
* {
  box-sizing: border-box;
}

html,
body {
  width: 100%;
  height: 100%;
}

body {
  margin: 1.25em .75em;
  background: url(https://subtlepatterns.com/patterns/black-Linen.png);
  font: 1.4em 'Exo', sans-serif;
}

nav[role="select"] {
  width: 100%;
  position: relative;
  color: #000;
}
nav[role="select"] > select {
  display: none;
}
nav[role="select"] ul {
  width: 100%;
  list-style: none;
}
nav[role="select"] ul > li {
  float: left;
  padding: .55em .45em;
  width: 19%;
  font-size: 1.2em;
  background-color: rgba(174, 86, 168, 0.5);
  text-align: center;
  transition-duration: .15s;
  transition-timing-function: ease-in-out;
  transition-property: box-shadow, background, color, text-align, padding;
  cursor: pointer;
}
nav[role="select"] ul > li:hover {
  background-color: rgba(174, 86, 168, 0.3);
  color: #fff;
  text-align: left;
  padding-left: .75em;
  box-shadow: 0 0 0 0.25em rgba(0, 0, 0, 0.3), 0 0 0 0.5em rgba(0, 0, 0, 0.3), 0 0 0 0.75em rgba(0, 0, 0, 0.3), inset 0 0 0 0.25em rgba(0, 0, 0, 0.3);
}
nav[role="select"] ul > li > a {
  color: inherit;
  text-decoration: none;
  transition: inherit;
}

/* small screens */
@media screen and (max-width: 44em) {
  body {
    margin: 1em 0;
  }

  nav[role="select"] ul {
    display: none;
  }
  nav[role="select"]:after {
    position: absolute;
    z-index: -1;
    content: "Menu";
    right: 0;
    bottom: -1.75em;
    background: rgba(174, 86, 168, 0.4);
    padding: .15em .55em;
  }
  nav[role="select"] select {
    display: block;
    user-select: none;
    cursor: pointer;
    width: 100%;
    padding: .55em .45em;
    border: none;
    background-color: rgba(174, 86, 168, 0.25);
    font: 1.2em 'Exo', sans-serif;
  }
}
JS
 /**
  Select
  
  # What? #
  Part of my "Responsive Menu Concepts" article on CSS-Tricks
  https://css-tricks.com/responsive-menu-concepts


  # 2012 by Tim Pietrusky
  # timpietrusky.com
**/
Host Instantly Drag and Drop Website Builder

 

Description

Part of my Responsive Menu Concepts article on CSS-Tricks.
Term
Mon, 11/27/2017 - 21:41

Related Codes

Pen ID
Pen ID
Pen ID