/ Background Patterns

A css Corners Pattern

A css Corners Pattern

Corners Pattern

A css Corners background Pattern.

Made with

Html
Css/SCSS

Author

yoksel

Css

$bgcolor: #E9F1DF;
$transparent: rgba(255, 255, 255, 0);

$color-5: #730046;
$color-4: #BFBB11;
$color-3: #FFC200;
$color-2: #E88801;
$color-1: #C93C00;

$size: 3em;
$big-size: $size*2;
$min: 0;
$max: $size*.16;

HTML {
  height: 100%;
  }
BODY {
  background: 
    linear-gradient(to right top,
      $transparent $min,
      $color-5 $min, $color-5 $max, 
      $transparent $max
      ) $size 0,
    linear-gradient(to left bottom,
      $transparent $min,
      $color-5 $min, $color-5 $max, 
      $transparent $max
      ) $size 0,
    linear-gradient(to right bottom,
      $transparent $min,
      $color-5 $min, $color-5 $max, 
      $transparent $max
      ) $size 0,
    linear-gradient(to left top,
      $transparent $min,
      $color-5 $min, $color-5 $max, 
      $transparent $max
      ) $size 0,
    
    linear-gradient(to right top,
      $transparent $min,
      $color-5 $min, $color-5 $max, 
      $transparent $max
      ) 0 $size,
    linear-gradient(to left bottom,
      $transparent $min,
      $color-5 $min, $color-5 $max, 
      $transparent $max
      ) 0 $size,
    linear-gradient(to right bottom,
      $transparent $min,
      $color-5 $min, $color-5 $max, 
      $transparent $max
      ) 0 $size,
    linear-gradient(to left top,
      $transparent $min,
      $color-5 $min, $color-5 $max, 
      $transparent $max
      ) 0 $size,
    
    linear-gradient(to right top,
      $transparent $min,
      $color-1 $min, $color-1 $max, 
      $color-2 $min*2, $color-2 $max*2, 
      $color-3 $min*3, $color-3 $max*3, 
      $color-4 $min*4, $color-4 $max*4, 
      $color-5 $min*5, $color-5 $max*5, 
      $transparent $max
      ) 0 0,
    linear-gradient(to right bottom,
      $transparent $min,
      $color-1 $min, $color-1 $max, 
      $color-2 $min*2, $color-2 $max*2, 
      $color-3 $min*3, $color-3 $max*3, 
      $color-4 $min*4, $color-4 $max*4, 
      $color-5 $min*5, $color-5 $max*5, 
      $transparent $max
      ) 0 0,
    linear-gradient(to left top,
      $transparent $min,
      $color-1 $min, $color-1 $max, 
      $color-2 $min*2, $color-2 $max*2, 
      $color-3 $min*3, $color-3 $max*3, 
      $color-4 $min*4, $color-4 $max*4, 
      $color-5 $min*5, $color-5 $max*5, 
      $transparent $max
      ) 0 0,
    linear-gradient(to left bottom,
      $transparent $min,
      $color-1 $min, $color-1 $max, 
      $color-2 $min*2, $color-2 $max*2, 
      $color-3 $min*3, $color-3 $max*3, 
      $color-4 $min*4, $color-4 $max*4, 
      $color-5 $min*5, $color-5 $max*5, 
      $transparent $max
      ) 0 0,
    
    linear-gradient(to right top,
      $transparent $min,
      $color-1 $min, $color-1 $max, 
      $color-2 $min*2, $color-2 $max*2, 
      $color-3 $min*3, $color-3 $max*3, 
      $color-4 $min*4, $color-4 $max*4, 
      $color-5 $min*5, $color-5 $max*5, 
      $transparent $max
      ) $size $size,
    linear-gradient(to right bottom,
      $transparent $min,
      $color-1 $min, $color-1 $max, 
      $color-2 $min*2, $color-2 $max*2, 
      $color-3 $min*3, $color-3 $max*3, 
      $color-4 $min*4, $color-4 $max*4, 
      $color-5 $min*5, $color-5 $max*5, 
      $transparent $max
      ) $size $size,
    linear-gradient(to left top,
      $transparent $min,
      $color-1 $min, $color-1 $max, 
      $color-2 $min*2, $color-2 $max*2, 
      $color-3 $min*3, $color-3 $max*3, 
      $color-4 $min*4, $color-4 $max*4, 
      $color-5 $min*5, $color-5 $max*5, 
      $transparent $max
      ) $size $size,
    linear-gradient(to left bottom,
      $transparent $min,
      $color-1 $min, $color-1 $max, 
      $color-2 $min*2, $color-2 $max*2, 
      $color-3 $min*3, $color-3 $max*3, 
      $color-4 $min*4, $color-4 $max*4, 
      $color-5 $min*5, $color-5 $max*5, 
      $transparent $max
      ) $size $size
    ;
  background-size:  $big-size $big-size;
  background-color: $bgcolor;
  background-repeat: repeat;
  font: 16px/2 'Trebuchet MS', Verdana, sans-serif;
  }

Demo

See the Pen Corners by yoksel (@yoksel) on CodePen.

CodeTea

A Nice collection of often useful examples done in HTML JavaScript CSS.

Read More