# Offset Frame Button

> A solid button with an offset outline frame that snaps into place on hover.

- Category: [CSS Buttons](https://copy-css.com/category/buttons)
- Tags: offset, frame, border, hover, editorial
- Live preview: https://copy-css.com/snippets/offset-frame-button
- License: Free for personal and commercial use. No signup, no attribution required.

## HTML

```html
<button class="btn-frame">Read more</button>
```

## CSS

```css
.btn-frame {
  position: relative;
  padding: 14px 30px;
  border: 0;
  background: #86198f;
  color: #fff;
  font: 600 16px/1 system-ui, sans-serif;
  cursor: pointer;
}

.btn-frame::after {
  content: "";
  position: absolute;
  inset: 0;
  border: 2px solid #86198f;
  transform: translate(7px, 7px);
  transition: transform 0.2s ease;
  pointer-events: none;
}

.btn-frame:hover::after {
  transform: translate(0, 0);
}
```

## Notes

- This CSS Offset Frame Button is 23 lines of pure CSS (0.4 KB) with no JavaScript and no dependencies. It uses transitions and transforms.
- In JSX use `className` instead of `class`. In Tailwind projects put the CSS in the global stylesheet.
