Last active
December 24, 2015 12:49
-
-
Save ghernandez345/6800694 to your computer and use it in GitHub Desktop.
file upload btn snippet
This file contains hidden or 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
<!-- The fileinput-button span is used to style the file input field as button --> | |
<button class="btn btn-default btn-lg upload-btn fileinput-button"> | |
<span>Upload More Files</span> | |
<!-- The file input field used as target for the file upload widget --> | |
<input id="fileupload" type="file" name="files[]" multiple> | |
</button> |
This file contains hidden or 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
// file upload btn styles | |
.upload-btn { | |
position: relative; | |
overflow: hidden; | |
> input { | |
cursor: pointer; | |
direction: ltr; | |
filter: alpha(opacity=0); | |
font-size: 60px; // height of the button | |
margin: 0; | |
opacity: 0; | |
position: absolute; | |
right: 0; | |
transform: translate(-300px, 0) scale(4); | |
top: 0; | |
width: 100%; // take up the entire width of the button | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment