# Making trippy shapes with CSS border and animating them to give you epilepsy

Animating CSS border property can result in in pretty spacey looking things. I
just played around with it and stuff appeared.

## The basics

The gist of this experiments is to:

- Make the border as wide as the box itself.
- Set different colors for the different borders.
- Then play with the border styles
- And animate it, of course.

```css
.module {
  border-color: #84be88 #695c83 #c87a61 #edc42c;
  border-width: 100px;
  box-sizing: border-box;
  float: left;
  height: 200px;
  margin: 0 20px 20px 0;
  width: 200px;
}
```

Trigger the animation on hover:

```css
.module:hover {
  animation: border-animation 2s linear infinite;
}
```

The border width keyframe animation looks something like this:

```css
@keyframes border-animation {
  0% {
    border-width: 100px;
  }
  50% {
    border-width: 0;
  }
  100% {
    border-width: 100px;
  }
}
```

## Borders on all sides same width

This examples uses a border on all sides of the component.

```css
.module {
  border-width: 100px;
}
```

[CodePen](https://codepen.io/hilja/pen/zKGHC)

## Borders only on left and right

```css
.module {
  border-width: 0px 100px 0px 100px;
}
```

[CodePen](https://codepen.io/hilja/pen/goruJ)

## These can get crazy

This one is the trippiest of them all:

[CodePen](https://codepen.io/hilja/pen/okDzd)

## Conclusion

I have no idea how to use there... maybe they’re purpose is not be useful at
all.
