LOADING...

Preview

Pen ID
Unlock Campus Themeforest adv

 

Code

Animated box frame with embedded SVG-files

( Containing div ’s of ) Embedded SVG-files are absolute positioned, ( black rectangles on top of linear-gradients: ) top div with black rectangles is animated using css-animations.

Pellentesque habitant morbi tristique senectus et netus et malesuada fames ac turpis egestas. Vestibulum tortor quam, feugiat vitae, ultricies eget, tempor sit amet, ante. Donec eu libero sit amet quam egestas semper. Aenean ultricies mi vitae est. Mauris placerat eleifend leo. Quisque sit amet est et sapien ullamcorper pharetra. Vestibulum erat wisi, condimentum sed, commodo vitae, ornare sit amet, wisi. Aenean fermentum, elit eget tincidunt condimentum, eros ipsum rutrum orci, sagittis tempus lacus enim ac dui. Donec non enim in turpis pulvinar facilisis. Ut felis. Praesent dapibus, neque id cursus faucibus, tortor neque egestas augue, eu vulputate magna eros eu erat. Aliquam erat volutpat. Nam dui mi, tincidunt quis, accumsan porttitor, facilisis luctus, metus

Pellentesque habitant morbi tristique senectus et netus et malesuada fames ac turpis egestas. Vestibulum tortor quam, feugiat vitae, ultricies eget, tempor sit amet, ante. Donec eu libero sit amet quam egestas semper. Aenean ultricies mi vitae est. Mauris placerat eleifend leo. Quisque sit amet est et sapien ullamcorper pharetra. Vestibulum erat wisi, condimentum sed, commodo vitae, ornare sit amet, wisi. Aenean fermentum, elit eget tincidunt condimentum, eros ipsum rutrum orci, sagittis tempus lacus enim ac dui. Donec non enim in turpis pulvinar facilisis. Ut felis. Praesent dapibus, neque id cursus faucibus, tortor neque egestas augue, eu vulputate magna eros eu erat. Aliquam erat volutpat. Nam dui mi, tincidunt quis, accumsan porttitor, facilisis luctus, metus

CSS
* {
  margin: 0;
  padding: 0;
  border: 0;
  vertical-align: baseline;
}

html {
  min-height: 100%;
  background-color: black;
  color: silver;
}

body {
  font: 100%/1.375 AvenirNext-Regular, Corbel, "Lucida Grande", "Lucida Unicode", "Lucida Sans", "Trebuchet Ms", sans-serif;
}

h1 {
  margin: 0 0 .5em;
  text-align: center;
  font-family: AvenirNextCondensed-DemiBold, Corbel, "Lucida Grande", "Lucida Sans", "Trebuchet Ms", Futura, sans-serif;
}

.container {
  margin: 0 5%;
  position: relative;
  overflow: hidden;
}

.container--animation {
  height: 1152px;
  margin-bottom: 2em;
}

.article {
  margin: 3em 0;
}

p {
  margin: 0 10%;
  padding: .5em 0;
}

p:first-child {
  font-size: 1.25em;
  color: white;
}

a {
  color: #f07;
  text-decoration: none;
}

.ab {
  position: absolute;
}

.top-gradient,
.bottom-gradient {
  z-index: -1;
  left: 0;
  height: 8px;
}

.top-gradient {
  top: 0;
}

.bottom-gradient {
  bottom: 8px;
}

.left-gradient,
.right-gradient {
  z-index: -1;
  top: 16px;
  height: 1152px;
  width: 8px;
}

.left-gradient {
  left: 0;
}

.right-gradient {
  right: 0;
}

.mat-horizontal-rtl,
.mat-horizontal-ltr {
  left: 0;
  height: 10px;
  -webkit-transition-property: margin-left;
  transition-property: margin-left;
  -webkit-animation-duration: 5s;
          animation-duration: 5s;
  -webkit-animation-iteration-count: infinite;
          animation-iteration-count: infinite;
  -webkit-animation-timing-function: linear;
          animation-timing-function: linear;
}

.mat-horizontal-rtl {
  top: 1px;
  z-index:1;
  -webkit-animation-name: slidein;
          animation-name: slidein;
}

.mat-horizontal-ltr {
  bottom: 6px;
  height: 9px;
  z-index:2;
  -webkit-animation-name: slideout;
          animation-name: slideout;
}

.mat-vertical-left,
.mat-vertical-right {
  top: 16px;
  z-index: 3;
  height: 1152px;
  width: 10px;
  -webkit-transition-property: margin-top;
  transition-property: margin-top;
  -webkit-animation-duration: 5s;
          animation-duration: 5s;
  -webkit-animation-iteration-count: infinite;
          animation-iteration-count: infinite;
  -webkit-animation-timing-function: linear;
          animation-timing-function: linear;
}

.mat-vertical-left {
  left: -1px;
  -webkit-animation-name: slideinvertical;
          animation-name: slideinvertical;
}

.mat-vertical-right {
  right: 1px;
  -webkit-animation-name: slideoutvertical;
          animation-name: slideoutvertical;
}

@-webkit-keyframes slidein {
  from {
    margin-left: 0;
    width: 200%
  }
  to {
    margin-left:-100%;
    width: 200%;
  }
}

@keyframes slidein {
  from {
    margin-left: 0;
    width: 200%
  }
  to {
    margin-left:-100%;
    width: 200%;
  }
}

@-webkit-keyframes slideout {
  from {
    margin-left: -100%;
    width: 200%
  }
  to {
    margin-left: 0;
    width: 200%;
  }
}

@keyframes slideout {
  from {
    margin-left: -100%;
    width: 200%
  }
  to {
    margin-left: 0;
    width: 200%;
  }
}

@-webkit-keyframes slideinvertical  {
  from {
    margin-top: -100%;
    width: 8px;
  }
  to {
    margin-top: 0;
    width: 8px;
  }
}

@keyframes slideinvertical  {
  from {
    margin-top: -100%;
    width: 8px;
  }
  to {
    margin-top: 0;
    width: 8px;
  }
}

@-webkit-keyframes slideoutvertical {
  from {
    margin-top: 0;
    width: 8px;
  }
  to {
    margin-top: -100%;
    width: 8px;
  }
}

@keyframes slideoutvertical {
  from {
    margin-top: 0;
    width: 8px;
  }
  to {
    margin-top: -100%;
    width: 8px;
  }
}

@media only screen and (max-width: 25em) {

  p {
    font-size: .875em;
  }

}

@media only screen and (min-width: 25em) {

  .container,
  .top-gradient,
  .bottom-gradient {
    width: 27em;
    margin: 0 auto;
  }

  .container--animation {
    margin-bottom: 2em;
  }

  p {
    margin: 0 12.5%;
  }

}

@media only screen and (min-width: 52em) {

  .container, .top-gradient, .bottom-gradient {
    width: 54em;
    margin: 0 auto;
  }

  .container--animation {
    margin-bottom: 2em;
  }

  p {
    margin: 0 18%;
  }

}

@media only screen and (min-width: 74em) {

  .container, .top-gradient, .bottom-gradient {
    width: 72em;
    margin: 0 auto;
  }

  .container--animation {
    margin-bottom: 2em;
  }

  p {
    margin: 0 25%;
  }

} 

Description

( Containing div's of ) Embedded SVG-files are absolute positioned, ( black rectangles on top of linear-gradients:) top div's with black rectangles is animated using css-animations.
Term
Wed, 11/29/2017 - 13:53

Related Codes

Pen ID
Pen ID
Pen ID
Square Adv