<div id="app">
<button @click="increase">+</button>
<span>{{ count }}</span>
<button @click="decrease">-</button>
</div>
@import "https://fonts.googleapis.com/css?family=Comfortaa:300,400,700&subset=cyrillic,cyrillic-ext,latin-ext";
body {
background: url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAMAAAFfKj/FAAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAAAlQTFRF4OXp8PX50NXZBLxR6QAAAEhJREFUeNpiYGJgYGACCCAGMAAIIDiDCSCAGLAAgABCEcbBBAggGIORQhogwNCcwIjddKgQI6ojUbkgWSYMo+BCjKiOR9PLBAAchAAxHFDBbwAAAABJRU5ErkJggg==");
display: flex;
width: 100vw;
height: 100vh;
justify-content: center;
align-items: center;
}
button {
color: #454545;
background: transparent;
border: 2px solid #454545;
position: relative;
margin: 1em;
display: inline-block;
vertical-align: middle;
padding: 0.5em 1em;
transition: all 0.3s ease-in-out;
text-align: center;
font-family: comfortaa;
font-weight: bold;
position: relative;
font-size: 2rem;
cursor: pointer;
}
button:before, button:after {
content: '';
display: block;
position: absolute;
border-color: #454545;
box-sizing: border-box;
border-style: solid;
width: 1em;
height: 1em;
transition: all 0.3s ease-in-out;
}
button:before {
top: -6px;
left: -6px;
border-width: 2px 0 0 2px;
z-index: 5;
}
button:after {
bottom: -6px;
right: -6px;
border-width: 0 2px 2px 0;
}
button:hover:before, button:hover:after {
width: calc(100% + 12px);
height: calc(100% + 12px);
border-color: #fff;
}
button:hover {
color: #353535;
background-color: #fff;
border-color: #fff;
}
button:active, button:focus {
outline: none;
}
span {
font-size: 2rem;
display: inline-block;
vertical-align: middle;
}
View Compiled
let app = new Vue({
el: '#app',
data () {
return {
count: 0
}
},
methods: {
increase: function () {
return this.count++
},
decrease: function () {
return this.count--
}
}
})
View Compiled
This Pen doesn't use any external CSS resources.