LOADING...

Preview

Pen ID
Unlock Campus Themeforest adv

 

Code

Menu buttons with sliding effect

#flexboxfridays
CSS
@import url("https://maxcdn.bootstrapcdn.com/font-awesome/4.3.0/css/font-awesome.min.css");
@import url("https://fonts.googleapis.com/css?family=Open+Sans:400,300,100");
body {
  display: flex;
  flex-direction: column;
  min-height: 100vh;
}

h3 {
  font-size: 32px;
  margin-bottom: 10px;
}

h5 {
  text-align: center;
}

.menu {
  background: orange;
  font-family: 'Open Sans', sans-serif;
  font-size: 16px;
  box-shadow: 1px 1px 3px rgba(0, 0, 0, 0.5);
}

.menu ul {
  display: flex;
  justify-content: center;
  max-width: 1080px;
  margin: auto;
}

.menu li {
  position: relative;
  min-width: 250px;
  border-right: solid 1px rgba(0, 0, 0, 0.2);
}

.menu li:first-child {
  border-left: solid 1px rgba(0, 0, 0, 0.2);
}

.menu a {
  text-decoration: none;
  color: #333;
  display: block;
  padding: 20px 30px;
  transition: .5s;
  text-transform: uppercase;
}

.menu a:hover {
  background: rgba(0, 0, 0, 0.2);
  display: block;
  text-indent: 24px;
  color: #fff;
}

.menu li:before {
  content: "";
  position: absolute;
  width: 24px;
  height: 24px;
  left: 20px;
  transform: scale(0);
  top: 50%;
  margin-top: -12px;
  transition: .2s;
  font-family: FontAwesome;
  font-size: 24px;
  color: #fff;
}

.menu li:hover:before {
  transform: scale(1);
  transition: .3s .3s;
}

.menu li a:before,
.menu li a:after {
  border-radius: 0;
  transition: 5s;
}

.menu li a:hover:before,
.menu li a:hover:after {
  content: "";
  position: absolute;
  z-index: -1;
  box-shadow: 0 0 20px rgba(0, 0, 0, 0.6);
  top: 0;
  bottom: 0;
  left: 20px;
  right: 20px;
  border-radius: 100px / 10px;
}

.menu li#home:before {
  content: "\f015";
}

.menu li#about:before {
  content: "\f007";
}

.menu li#contact:before {
  content: "\f0e0";
}

.content {
  flex: 1;
  display: flex;
  justify-content: center;
  align-items: center;
}

.box {
  background: #ddd;
  padding: 30px;
}

Description

Contribution to #flexboxfridays.
Term
Wed, 11/29/2017 - 09:35

Related Codes

Pen ID
Pen ID
Pen ID
Square Adv