<div id="app">
  <button @click="count++">+</button>
  <p>Counter: {{ count }}</p>
</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;
}

p {
  font-size: 2rem;
  display: inline-block;
  vertical-align: middle;
}
let app = new Vue({
  el: '#app',
  data () {
    return {
      count: 0
    }
  }
})

let unwatch = app.$watch(
  function () {
    return this.count
  },
  function(newValue, oldValue){
    alert('Count 从 ' + oldValue + ' 变成 ' + newValue + '!')
}
) 

setTimeout(() => {
  unwatch()
},5000)
View Compiled

External CSS

This Pen doesn't use any external CSS resources.

External JavaScript

  1. https://cdnjs.cloudflare.com/ajax/libs/vue/2.3.4/vue.min.js