Current position: home page > Site Template >Blueleaf share beautify file upload form select file button code

Blueleaf share beautify file upload form select file button code

Author: blueleaf Classification: Site Template Time: January 30, 2021 Browse: 2171
  • Applicable version: EMLOG5.3. X
  • Template category: html template
  • Applicable site: file upload form style
  • Template nature: free template
  • Copyright: Blueleaf
  • Template preview: preview the drawing or contact the author
  • Template price: ¥0 element
  • Online consultation: Click Contact
  •  Beautify the file upload form, select the file button code
    Beautify the file upload form, select the file button code
  •  Beautify file upload form Select file button code 2
    Beautify file upload form Select file button code 2
  •  Contact the Blue Leaf webmaster for more demos

Template The file upload file form was written during production. The default style is not very beautiful. In order to look beautiful, we need to customize the code to beautify the file upload form selection button. In order to facilitate webmasters who need it, today Blueleaf shares the code of beautifying the file upload form selection button, which contains css Style, html code javascript Code. You only need to copy the code and modify it slightly to put it into the template for use.

 <style> *{margin:0; border:0;padding:0;} .file{margin:100px auto 0; width:300px;border:1px solid #00aff0;height:40px;border-radius:6px;position:relative} .blueButton{position:absolute; display:block;width:100px;height:40px;right:0;background-color:#00b3ee;color:#fff;text-decoration:none;text-align:center;font:normal normal normal 16px/40px 'Microsoft YaHei';cursor:pointer;border-radius:4px} .blueButton:hover{text-decoration:none} .myFileUpload{position:absolute; display:block;width:100px;height:40px;right:0;opacity:0} .show{position:absolute;top:5px;left:5px;width:calc(100% - 100px); height:30px;font:normal normal normal 14px/30px 'Microsoft YaHei'} </style> <div class="file"> <div class="show">Please select the file to upload</ div> <a href='javascript:void(0);'  Class="blueButton">Select File</a> <input type="file" class="myFileUpload" /> </div> <script src="//cdn.staticfile.org/ jquery /1.7.2/jquery.min.js" type="text/javascript"></script> <script type="text/javascript"> $(document).ready(function() { $(".myFileUpload").change(function(){ var arrs=$(this).val().split('\\'); console.log(arrs); var filename=arrs[arrs.length-1]; $(".show").html(filename); }); }); </script>

Disclaimer:

Website: Click Copy to share with friends!

All content resources shared by this website, if not noted, are original by Blueleaf. If you need to reprint, please indicate the source; Please contact us in case of infringement Contact handling Please understand!

Comment List
 blink the eyes kiss Growl happy think poor It's embarrassing Grievance ha-ha hush Right hum Zuo Hum Hum doubt A bad laugh Make money Sadness Be cool Seduce fierce handshake yeah Hee hee Shyness applause greedy Madness Embrace gather and watch Mighty awesome
Submit comments

Clear information
Close Comment
music appreciation
Back to top