Skip to content

Instantly share code, notes, and snippets.

@MartialEscudero
Last active April 28, 2023 15:51
Show Gist options
  • Select an option

  • Save MartialEscudero/d4381b02c36dfcaafa2ff1b13eb6b339 to your computer and use it in GitHub Desktop.

Select an option

Save MartialEscudero/d4381b02c36dfcaafa2ff1b13eb6b339 to your computer and use it in GitHub Desktop.
Button with double transparent border // Bouton avec double bordure transparente
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width">
<style>
body {
background: gray;
font-family: system-ui;
}
.btn {
display: block;
width: fit-content;
outline: none;
font-size: 18px;
color: cyan;
padding: 2px;
background-clip: content-box;
background-color: navy;
border-radius: 6px;
border: 2px solid navy;
}
.btn > span {
display: block;
padding: 14.5px 40px;
}
.btn:hover {
cursor: pointer;
color: orange;
background-color: darkred;
border-color: darkred;
}
</style>
</head>
<body>
<button class="btn">
<span>&lt;button&gt;</span>
</button>
<br><br><br>
<a class="btn">
<span>&lt;a&gt;</span>
</a>
</body>
</html>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment