LOADING...

Preview

Pen ID
Unlock Campus Themeforest adv

 

Code

Plus-cross transition

Could be used for an app-menu where adding is required

  • text
  • photo
  • link
CSS
body {
  background: #333;
  margin: 0 auto;
  text-align: center;
  width: 180px;
}
h1 {
  color: #fff;
  font-size: 2em;
}
h2 {
  color: #999;
  font-size: .8em;
  line-height: 1.2em;
}
a {
text-decoration: none;
}
ul {
  margin: 0;
  padding: 0;
  list-style: none;
}
.menu {
  background: #ebebeb;
  height: 40px;
  margin-bottom: 5px;
  width: 180px;
}
.menu li {
  float: left;
  font-size: 30px;
  height: 40px;
  line-height: 40px;
  width: 60px;
}
.add {
  display: block;
  font-weight: bold;
  height: 40px;
  transition: all .4s ease-in-out;
}
.plus {
  background: #bada55;
  transition: all .4s ease-in-out;
}
.open {
  background: #f67;
}
.rotate{
  -webkit-transform: rotate(45deg);
}
.pop {
  background: #ebebeb;
  border-radius: 5px;
  display: none;
  font: 1.25em 'Myriad Pro';
  width: 180px;
}

.pop li {
  border-bottom: 1px solid #ccc;
  height: 40px;
  line-height: 40px;
  text-align: center;
}
.pop li:last-of-type {
  border: 0;
}
.pop li:hover {
  background: #bada55;
  border-radius: 5px;
}
.pop li:hover:nth-child(2n){
  border-radius: 0;
}
JS
$(".plus").click(function() {
  $(".add").toggleClass("rotate");
  $(".plus").toggleClass("open");
  $(".pop").slideToggle(400);
});
Host Instantly Drag and Drop Website Builder

 

Description

Simple idea for adding content in an app or short menu - plus rotates to cross, add becomes remove/hide the pop-up menu.
Term
Mon, 11/27/2017 - 22:10

Related Codes

Pen ID
Pen ID
Pen ID