<div id="wrap">
<!-- section -->
<div class="section">
<div class="section__center">
<div class="section__contents">
<div id="button">
<span>Click Me</span>
</div>
</div>
</div>
</div>
<!--/section -->
</div>
html,
body {
cursor: default;
font-size: 18px;
font-family: monospace;
background-color: #fff;
color: #333;
}
* {
box-sizing: border-box;
outline: none;
}
#wrap {
width: 100%;
position: relative;
}
.section {
padding: 60px 0;
position: relative;
&__center {
width: 100%;
max-width: 1024px;
margin: 0 auto;
}
&__contents {
width: 100%;
height: 100%;
padding: 0 20px;
}
}
#button {
display: inline-block;
position: relative;
padding: 20px 10px;
background-color: #000;
color: #fff;
font-weight: 700;
font-size: 32px;
text-align: center;
white-space: nowrap;
cursor: pointer;
user-select: none;
span {
display: block;
position: relative;
z-index: 1;
}
&::before,
&::after {
content: '';
display: block;
position: absolute;
top: 0;
bottom: 0;
background-color: #000;
width: 20%;
}
&::before {
left: 0;
margin-left: -10%;
transform: skewX(20deg);
}
&::after {
left: 100%;
margin-left: -10%;
transform: skewX(-20deg);
}
}
View Compiled
$(function () {
$('#button').click(function () {
var $theBtn = $(this),
buttonFontSize = parseInt($theBtn.css('font-size')),
newButtonFontSize = buttonFontSize + 10 + 'px';
$(this).css({
fontSize: newButtonFontSize
});
});
});
This Pen doesn't use any external CSS resources.