-
-
Save pmdartus/39bd3d4543a3864185bb324703379081 to your computer and use it in GitHub Desktop.
Inner Button Step counter using flexbox // source https://jsbin.com/gorelu
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<!DOCTYPE html> | |
<html> | |
<head> | |
<meta name="description" content="Step counter using flexbox"> | |
<meta charset="utf-8"> | |
<meta name="viewport" content="width=device-width"> | |
<title>Inner Button</title> | |
<style id="jsbin-css"> | |
.stepper-input { | |
display: flex; | |
} | |
.stepper-input__input { | |
width: 60px; | |
text-align: center; | |
border-left: 0; | |
border-right: 0; | |
} | |
.button { | |
cursor: pointer; | |
padding: 5px 15px; | |
color: #FFFFFF; | |
background-color: #4EBBE4; | |
font-size: 12px; | |
border: 1px solid #16A2D7; | |
border-radius: 5px; | |
} | |
.button--addRight { | |
border-top-left-radius: 0; | |
border-bottom-left-radius: 0; | |
} | |
.button--addLeft { | |
border-top-right-radius: 0; | |
border-bottom-right-radius: 0; | |
} | |
</style> | |
</head> | |
<body> | |
<div class="stepper-input"> | |
<button class="button button--addLeft">-</button> | |
<input class="stepper-input__input" type="text" value="24" placeholder="Age"/> | |
<button class="button button--addRight">+</button> | |
</div> | |
<script id="jsbin-source-css" type="text/css">.stepper-input { | |
display: flex; | |
} | |
.stepper-input__input { | |
width: 60px; | |
text-align: center; | |
border-left: 0; | |
border-right: 0; | |
} | |
.button { | |
cursor: pointer; | |
padding: 5px 15px; | |
color: #FFFFFF; | |
background-color: #4EBBE4; | |
font-size: 12px; | |
border: 1px solid #16A2D7; | |
border-radius: 5px; | |
} | |
.button--addRight { | |
border-top-left-radius: 0; | |
border-bottom-left-radius: 0; | |
} | |
.button--addLeft { | |
border-top-right-radius: 0; | |
border-bottom-right-radius: 0; | |
}</script> | |
</body> | |
</html> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
.stepper-input { | |
display: flex; | |
} | |
.stepper-input__input { | |
width: 60px; | |
text-align: center; | |
border-left: 0; | |
border-right: 0; | |
} | |
.button { | |
cursor: pointer; | |
padding: 5px 15px; | |
color: #FFFFFF; | |
background-color: #4EBBE4; | |
font-size: 12px; | |
border: 1px solid #16A2D7; | |
border-radius: 5px; | |
} | |
.button--addRight { | |
border-top-left-radius: 0; | |
border-bottom-left-radius: 0; | |
} | |
.button--addLeft { | |
border-top-right-radius: 0; | |
border-bottom-right-radius: 0; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment