<div id="app">
<div class="item">
<img src="https://s3-us-west-2.amazonaws.com/s.cdpn.io/28963/backpack.jpg " alt="" width="235" height="300" />
<div class="quantity">
<button class="inc" @click="counter > 0 ? counter -= 1 : 0">-</button>
<span class="quant-text"> {{ counter }}</span>
<button class="inc" @click="counter += 1">+</button>
</div>
<button class="submit" @click="">Submit</button>
</div>
</div>
body, html {
font-family: 'PT Serif', serif;
}
.special {
font-family: 'Montserrat', sans-serif;
text-transform: uppercase;
letter-spacing: 0.08em;
font-size: 12px;
}
h1, h2, h3, li {
@extend .special;
}
li {
list-style: none;
display: inline-block;
}
input {
background: #eee;
}
.quant-text {
display: inline-block;
text-align: center;
padding: 8px;
@extend .special;
}
.quantity {
padding: 10px 5px;
background: #fff;
margin: 0 20px;
box-sizing: border-box;
text-align: center;
}
.item {
display: flex;
flex-direction: column;
width: 280px;
justify-content: space-around;
background: #eee;
padding: 20px 10px;
margin: 30px;
img {
align-self: center;
}
}
button {
border-radius: 5px;
padding: 5px 15px;
font-size: 22px;
text-decoration: none;
margin: 10px;
color: #fff;
position: relative;
display: inline-block;
background-color: #55acee;
box-shadow: 0px 5px 0px 0px #3C93D5;
border: none 0;
&.submit {
padding: 15px 20px;
box-sizing: border-box;
margin-left: 22px;
margin-right: 22px;
}
}
button:active {
transform: translate(0px, 5px);
box-shadow: 0px 1px 0px 0px;
outline: none 0;
}
button:hover {
background-color: #6FC6FF;
}
button:focus {
outline: none 0;
}
View Compiled
new Vue({
el: '#app',
data() {
return {
counter: 0
}
}
})
View Compiled
This Pen doesn't use any external CSS resources.