Created
August 3, 2020 07:42
-
-
Save jsgao0/79c42f31e51597381cf9aa66f2ec606b to your computer and use it in GitHub Desktop.
custom styles for file upload button
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 charset="utf-8"> | |
<meta name="viewport" content="width=device-width"> | |
<title>Custom Button of Upload File</title> | |
<style> | |
.upload-btn { | |
position: relative; | |
width: 40px; | |
height: 40px; | |
border-radius: 50%; | |
border: none; | |
background-color: #2b3344; | |
} | |
.upload-btn span { | |
color: #fff; | |
font-size: 25px; | |
font-weight: 100; | |
} | |
.upload-btn input[type=file] { | |
width: 40px; | |
height: 40px; | |
position: absolute; | |
left:0; | |
top: 0; | |
opacity: 0; | |
} | |
</style> | |
</head> | |
<body> | |
<div> | |
<button class="upload-btn"> | |
<span>+</span> | |
<input type="file" /> | |
</button> | |
</div> | |
</body> | |
</html> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment