LOADING...

Preview

Pen ID
Unlock Campus Themeforest adv

 

Code

Buttons

Random selection of button styles. May change over time as I get alot of stupid ideas. Feel free to follow me on

Let's start
Touch me
Just like that
And that, oh, yeah
Now that I like
God, that's so nice
Now lower down
Where the figs lie
CSS
:root {
  --color-dark: #161616;
  --color-ocean: #416dea;
  --color-grass: #3dd28d;
  --color-snow: #FFFFFF;
  --color-salmon: #F32C52;
  --color-sun: #feee7d;
  --color-alge: #7999a9;
  --color-flower: #353866;
  --color-smoke: #e4e4e4;
  --font-face: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol";
}

html {
  box-sizing: border-box;
}

*, *:before, *:after {
  box-sizing: inherit;
}

body {
  display: -webkit-box;
  display: -ms-flexbox;
  display: flex;
  box-sizing: border-box;
  min-height: 100vh;
  background: whitesmoke;
  font-family: var(--font-face);
  font-size: 16px;
  font-weight: 700;
  line-height: 1;
  -webkit-box-pack: center;
      -ms-flex-pack: center;
          justify-content: center;
  -webkit-box-align: center;
      -ms-flex-align: center;
          align-items: center;
}
@media (min-width: 992px) {
  body {
    border-width: 30px;
  }
}

body.linked .button, body.linked h1 {
  opacity: .3;
  -webkit-transition: opacity 300ms linear;
  transition: opacity 300ms linear;
}
body.linked p {
  color: var(--color-smoke);
  -webkit-transition: color 300ms linear;
  transition: color 300ms linear;
}

h1 {
  text-align: center;
  -webkit-transition: opacity 300ms linear;
  transition: opacity 300ms linear;
  color: var(--color-dark);
  font-family: var(--font-face);
  font-size: 32px;
  font-weight: 700;
}
h1 span {
  font-weight: 400;
}

p {
  max-width: 460px;
  margin: 0 auto;
  -webkit-transition: color 300ms linear;
  transition: color 300ms linear;
  text-align: center;
  color: var(--color-dark);
  font-weight: 400;
  line-height: 1.5;
}

a, a:visited {
  text-decoration: none;
  color: var(--color-ocean);
  font-weight: 500;
}
a:hover, a:visited:hover {
  text-decoration: underline;
  color: var(--color-ocean);
}

.container {
  display: -webkit-box;
  display: -ms-flexbox;
  display: flex;
  -webkit-box-orient: vertical;
  -webkit-box-direction: normal;
      -ms-flex-direction: column;
          flex-direction: column;
  width: 100%;
  padding: 20px;
}

.button-container {
  display: -webkit-box;
  display: -ms-flexbox;
  display: flex;
  margin: 60px auto;
  -ms-flex-wrap: wrap;
      flex-wrap: wrap;
  -webkit-box-pack: center;
      -ms-flex-pack: center;
          justify-content: center;
}

.button {
  display: -webkit-box;
  display: -ms-flexbox;
  display: flex;
  overflow: hidden;
  margin: 10px;
  padding: 12px 12px;
  cursor: pointer;
  -webkit-user-select: none;
     -moz-user-select: none;
      -ms-user-select: none;
          user-select: none;
  -webkit-transition: all 150ms linear;
  transition: all 150ms linear;
  text-align: center;
  white-space: nowrap;
  text-decoration: none !important;
  text-transform: none;
  text-transform: capitalize;
  color: #fff;
  border: 0 none;
  border-radius: 4px;
  font-size: 13px;
  font-weight: 500;
  line-height: 1.3;
  -webkit-appearance: none;
  -moz-appearance: none;
  appearance: none;
  -webkit-box-pack: center;
      -ms-flex-pack: center;
          justify-content: center;
  -webkit-box-align: center;
      -ms-flex-align: center;
          align-items: center;
  -webkit-box-flex: 0;
      -ms-flex: 0 0 160px;
          flex: 0 0 160px;
  box-shadow: 2px 5px 10px var(--color-smoke);
}
.button:hover {
  -webkit-transition: all 150ms linear;
  transition: all 150ms linear;
  opacity: .85;
}
.button:active {
  -webkit-transition: all 150ms linear;
  transition: all 150ms linear;
  opacity: .75;
}
.button:focus {
  outline: 1px dotted #959595;
  outline-offset: -4px;
}

.button.-regular {
  color: #202129;
  background-color: #f2f2f2;
}
.button.-regular:hover {
  color: #202129;
  background-color: #e1e2e2;
  opacity: 1;
}
.button.-regular:active {
  background-color: #d5d6d6;
  opacity: 1;
}

.button.-dark {
  color: var(--color-snow);
  background: var(--color-dark);
}
.button.-dark:focus {
  outline: 1px dotted white;
  outline-offset: -4px;
}

.button.-green {
  color: var(--color-snow);
  background: var(--color-grass);
}

.button.-blue {
  color: var(--color-snow);
  background: var(--color-ocean);
}

.button.-salmon {
  color: var(--color-snow);
  background: var(--color-salmon);
}

.button.-sun {
  color: #f15c5c;
  background: var(--color-sun);
}

.button.-alge {
  color: #e7ff20;
  background: var(--color-alge);
}

.button.-flower {
  color: #FE8CDF;
  background: var(--color-flower);
}
JS
const	body = document.querySelector('body')
const twitter = document.querySelector('.twitter')

twitter.addEventListener("mouseover", function () {
    body.classList.add('linked')
},false)

twitter.addEventListener("mouseout", function () {
    body.classList.remove('linked')
}, false)

Description

Simple button styles to kickstart you webdesign!
Term
Mon, 11/27/2017 - 21:28

Related Codes

Pen ID
Pen ID
Pen ID
Square Adv