When uploading on some websites, after clicking the "Browse" button, the [Select File] dialog box will pop up. To achieve this function, just use the input file control~ XML/HTML CodeCopy content to clipboard
The effect picture is like this: Notice! Don't think this is composed of a text and a button, it is actually a file control. Today, I encountered a requirement at work: do not display "No file selected". After tinkering with it for an hour, I found that setting its width value solved it: Code: <input type="file" value="Select file" /> The width value is set to 70px, as shown below: 【beautify】 Ideas: The outer div is to provide a position reference for the input inside, because relative positioning is required when writing styles, so that the real file control covers the simulated one, and then hides the file control (even if the file control is not visible) XML/HTML CodeCopy content to clipboard
Effect: The above article about input file controls and beautification is all the content that the editor shares with you. I hope it can give you a reference. I also hope that you will support 123WORDPRESS.COM. |
<<: JavaScript data transmission between different pages (URL parameter acquisition)
>>: Example of implementing QR code scanning effects with CSS3
Preface For a long time, the application and lear...
Install virtualization software Before installing...
background When we talk about transactions, every...
This article mainly introduces the differences be...
The form elements with visibility=hidden and displ...
Query Cache 1. Query Cache Operation Principle Be...
Preface Before we begin, we should briefly unders...
Table of contents Preface 1. What is a closure? 1...
The following are its properties: direction Set th...
letter-spacing property : Increase or decrease th...
The before/after pseudo-class is equivalent to in...
Table of contents splice() Method join() Method r...
Table of contents Preface How to use Summarize Pr...
Table of contents 1. Component Registration 1.1 G...
Table of contents introduction Ideas Establish ID...