How to style an Ionic input file as a button
If you only want to style an element <input>as a button, for example, you can accept one of the suggested styles for this message: http://geniuscarrier.com/how-to-style-a-html-file-upload-button-in-pure- css /
CSS-: https://css-tricks.com/snippets/css/custom-file-input-styling-webkitblink/
: http://tympanus.net/codrops/2015/09/15/styling-customizing-file-inputs-smart-way/
, , cordova. : https://github.com/apache/cordova-plugin-file
, , - for css. , . , , .
<label class="myFakeUploadButton" for="myFileInput">Upload</label>
<input type="file" id="myFileInput">
#myFileInput{
position: absolute;
opacity: 0;
}
.myFakeUploadButton{
/* Whatever you want */
}
, :
<input type="file" accept="image/*" capture="camera" (change)="onFileSelected($event)" id="fileInput"/>
<label for="fileInput" icon-only ion-button>
<ion-icon name="camera"></ion-icon>
</label>