Gradient Borders

A Pen By Adonis K.

Pen Settings

↑ Insert the most common viewport meta tag

CSS Base

Vendor Prefixing

Add External CSS

These stylesheets will be added in this order and before the code you write in the CSS editor. You can also add another Pen here, and it will pull the CSS from it. Try typing "font" or "ribbon" below.

Quick-add: + add another resource
via CSS Lint

Add External JavaScript

These scripts will run in this order and before the code in the JavaScript editor. You can also link to another Pen here, and it will run the JavaScript from it. Also try typing the name of any popular library.

Quick-add: + add another resource
via JS Hint

Code Indentation


Save Automatically?

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

Want a Run Button?

If active, the preview will update automatically when you change code.


              <div id="wrap">
  <h1>Gradient borders</h1>
  <div class="box-wrap">
    <div class="box">Lorem ipsum dolor sit amet, consectetur adipisicing elit. Quae necessitatibus quos esse nisi sed explicabo unde omnis excepturi ratione hic eligendi iusto voluptatem voluptate! Sit a nostrum ut expedita alias quaerat ea ratione animi harum perspiciatis dolorem deleniti aliquam velit vel non obcaecati ducimus. Nisi excepturi debitis dolorem natus veritatis labore eligendi architecto quasi laudantium ipsam cum doloribus veniam sint error aliquam voluptate alias reiciendis neque nam quo iure dolorum dolores earum eveniet voluptatum. Veniam quas ipsum molestiae officia sed necessitatibus ad numquam vitae aperiam facere quibusdam minus nostrum maxime error accusantium cum nulla illo quis ipsa dolor magni nobis!</div>


              $color1: #09f;
$color2: #6c3;
$color3: #c33;

  padding: 1rem;
  background-color: #fff;
  text-align: left;

  display: inline-block;
  width: 70%;
  padding: 5px;
  background-image: -webkit-linear-gradient(left, $color1, $color2, $color3, $color2, $color1);
  background-image: -moz-linear-gradient(left, $color1, $color2, $color3, $color2, $color1);
  background-image: -ms-linear-gradient(left, $color1, $color2, $color3, $color2, $color1);
  background-image: linear-gradient(left, $color1, $color2, $color3, $color2, $color1);
  border: 1px solid #666;
  box-shadow: 0 0 5px #333;

/* styling */
 html {
	width: 100%;
	height: 100%;
	background: radial-gradient(circle, #fff 0%, #aaa 100%) no-repeat;
	overflow-x: hidden;
	overflow-y: hidden;

body {
	text-align: center;
	display: table;
	width: 100%;
	height: 100%;
	overflow-x: hidden;
	overflow-y: hidden;

#wrap {
	box-sizing: border-box;
	display: table-cell;
	vertical-align: middle;


              // Trying to implement a mockup of my website back at 2010
Loading ..................