In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-03-29 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Development >
Share
Shulou(Shulou.com)06/01 Report--
This article mainly explains "how to customize the style of HTML form file selection box". Interested friends may wish to have a look. The method introduced in this paper is simple, fast and practical. Next let the editor to take you to learn "HTML form file selection box style how to customize" it!
The code is as follows:
Form file selection box style
Body {font-family:Arial,Verdana,sans-serif; margin:100px;}
.uploader {
Position:relative
Display:inline-block
Overflow:hidden
Cursor:default
Padding:0
Margin:10px 0px
-moz-box-shadow:0px 0px 5px # ddd
-webkit-box-shadow:0px 0px 5px # ddd
Box-shadow:0px 0px 5px # ddd
-moz-border-radius:5px
-webkit-border-radius:5px
Border-radius:5px
}
. Filename {
Float:left
Display:inline-block
Outline:0 none
Height:32px
Width:180px
Margin:0
Padding:8px 10px
Overflow:hidden
Cursor:default
Border:1px solid
Border-right:0
Font:9pt/100% Arial, Helvetica, sans-serif; color:#777
Text-shadow:1px 1px 0px # fff
Text-overflow:ellipsis
White-space:nowrap
-moz-border-radius:5px 0px 0px 5px
-webkit-border-radius:5px 0px 0px 5px
Border-radius:5px 0px 0px 5px
Background:#f5f5f5
Background:-moz-linear-gradient (top, # fafafa 0%, # eee 100%)
Background:-webkit-gradient (linear, left top, left bottom, color-stop (0% recall fafafa), color-stop (100% statement f5f5f5)
Filter:progid:DXImageTransform.Microsoft.gradient (startColorstr='#fafafa', endColorstr='#f5f5f5',GradientType=0)
Border-color:#ccc
-moz-box-shadow:0px 0px 1px # fff inset
-webkit-box-shadow:0px 0px 1px # fff inset
Box-shadow:0px 0px 1px # fff inset
-moz-box-sizing:border-box
-webkit-box-sizing:border-box
Box-sizing:border-box
}
.button {
Float:left
Height:32px
Display:inline-block
Outline:0 none
Padding:8px 12px
Margin:0
Cursor:pointer
Border:1px solid
Font:bold 9ptUniver 100% Arial, Helvetica, sans-serif
-moz-border-radius:0px 5px 5px 0px
-webkit-border-radius:0px 5px 5px 0px
Border-radius:0px 5px 5px 0px
-moz-box-shadow:0px 0px 1px # fff inset
-webkit-box-shadow:0px 0px 1px # fff inset
Box-shadow:0px 0px 1px # fff inset
.uploader input [type=file] {
Position:absolute
Top:0; right:0; bottom:0
Border:0
Padding:0; margin:0
Height:30px
Cursor:pointer
Filter:alpha (opacity=0)
-moz-opacity:0
-khtml-opacity: 0
Opacity:0
}
Input [type=button]::-moz-focus-inner {padding:0; border:0 none;-moz-box-sizing:content-box;}
Input [type=button]::-webkit-focus-inner {padding:0; border:0 none;-webkit-box-sizing:content-box;}
Input [type=text]::-moz-focus-inner {padding:0; border:0 none;-moz-box-sizing:content-box;}
Input [type=text]::-webkit-focus-inner {padding:0; border:0 none;-webkit-box-sizing:content-box;}
/ * White Color Scheme-* /
.white .button {
Color:#555
Text-shadow:1px 1px 0px # fff
Background:#ddd
Background:-moz-linear-gradient (top, # eeeeee 0%, # dddddd 100%)
Background:-webkit-gradient (linear, left top, left bottom, color-stop (0% memoriee), color-stop (100% recorder dddddd))
Filter:progid:DXImageTransform.Microsoft.gradient (startColorstr='#eeeeee', endColorstr='#dddddd',GradientType=0)
Border-color:#ccc
}
.white: hover .button {
Background:#eee
Background:-moz-linear-gradient (top, # dddddd 0%, # eeeeee 100%)
Background:-webkit-gradient (linear, left top, left bottom, color-stop (0% recorder dddddd), color-stop (100% recorder IEEE)
Filter:progid:DXImageTransform.Microsoft.gradient (startColorstr='#dddddd', endColorstr='#eeeeee',GradientType=0)
}
/ * Blue Color Scheme-* /
.blue .button {
Color:#fff
Text-shadow:1px 1px 0px # 09365f
Background:#064884
Background:-moz-linear-gradient (top, # 3b75b4 0%, # 064884)
Background:-webkit-gradient (linear, left top, left bottom, color-stop (0% meme 3b75b4), color-stop (100% meme 064884))
Filter:progid:DXImageTransform.Microsoft.gradient (startColorstr='#3b75b4', endColorstr='#064884',GradientType=0)
Border-color:#09365f
}
.blue: hover .button {
Background:#3b75b4
Background:-moz-linear-gradient (top, # 064884, # 3b75b4 100%)
Background:-webkit-gradient (linear, left top, left bottom, color-stop (0% Personality 064884), color-stop (100% Personality 3b75b4))
Filter:progid:DXImageTransform.Microsoft.gradient (startColorstr='#064884', endColorstr='#3b75b4',GradientType=0)
}
/ * Green Color Scheme-* /
.green .button {
Color:#fff
Text-shadow:1px 1px 0px # 6b7735
Background:#7d8f33
Background:-moz-linear-gradient (top, # 93aa4c 0%, # 7d8f33 100%)
Background:-webkit-gradient (linear, left top, left bottom, color-stop (0% meme 93aa4c), color-stop (100% d8f33))
Filter:progid:DXImageTransform.Microsoft.gradient (startColorstr='#93aa4c', endColorstr='#7d8f33',GradientType=0)
Border-color:#6b7735
}
.green: hover .button {
Background:#93aa4c
Background:-moz-linear-gradient (top, # 7d8f33 0%, # 93aa4c 100%)
Background:-webkit-gradient (linear, left top, left bottom, color-stop (0% meme 7d8f33), color-stop (100% recorder 93aa4c))
Filter:progid:DXImageTransform.Microsoft.gradient (startColorstr='#7d8f33', endColorstr='#93aa4c',GradientType=0)
}
/ * Red Color Scheme-* /
.red .button {
Color:#fff
Text-shadow:1px 1px 0px # 7e0238
Background:#90013f
Background:-moz-linear-gradient (top, # b423640%, # 90013f 100%)
Background:-webkit-gradient (linear, left top, left bottom, color-stop (0% recorder b42364), color-stop (100% recorder 90013f))
Filter:progid:DXImageTransform.Microsoft.gradient (startColorstr='#b42364', endColorstr='#90013f',GradientType=0)
Border-color:#7e0238
}
.red: hover .button {
Background:#b42364
Background:-moz-linear-gradient (top, # 90013f 0%, # b42364%)
Background:-webkit-gradient (linear, left top, left bottom, color-stop (0% meme 90013f), color-stop (100% recorder b42364))
Filter:progid:DXImageTransform.Microsoft.gradient (startColorstr='#90013f', endColorstr='#b42364',GradientType=0)
}
/ * Orange Color Scheme-* /
.orange .button {
Color:#fff
Text-shadow:1px 1px 0px # c04501
Background:#d54d01
Background:-moz-linear-gradient (top, # f86c1f 0%, # d54d01 100%)
Background:-webkit-gradient (linear, left top, left bottom, color-stop (0% recorder f86c1f), color-stop (100% recorder d54d01))
Filter:progid:DXImageTransform.Microsoft.gradient (startColorstr='#f86c1f', endColorstr='#d54d01',GradientType=0)
Border-color:#c04501
}
.orange: hover .button {
Background:#f86c1f
Background:-moz-linear-gradient (top, # d54d01 0%, # f86c1f 100%)
Background:-webkit-gradient (linear, left top, left bottom, color-stop (0% mind54d01), color-stop (100% recorder f86c1f))
Filter:progid:DXImageTransform.Microsoft.gradient (startColorstr='#d54d01', endColorstr='#f86c1f',GradientType=0)
}
/ * Black Color Scheme-* /
.black .button {
Color:#fff
Text-shadow:1px 1px 0px # 111111
Background:#222222
Background:-moz-linear-gradient (top, # 444444, # 222222)
Background:-webkit-gradient (linear, left top, left bottom, color-stop (0% pencil 444444), color-stop (100% meme 222222))
Filter:progid:DXImageTransform.Microsoft.gradient (startColorstr='#444444', endColorstr='#222222',GradientType=0)
Border-color:#111111
}
.black: hover .button {
Background:#444444
Background:-moz-linear-gradient (top, # 222222, # 444444)
Background:-webkit-gradient (linear, left top, left bottom, color-stop (0% Personality 222222), color-stop (100% Personality 444444))
Filter:progid:DXImageTransform.Microsoft.gradient (startColorstr='#222222', endColorstr='#444444',GradientType=0)
}
$(function () {)
$("input [type=file]") .change (function () {$(this) .readers (".filename") .find (".filename") .val ($(this) .change ();})
$("input [type=file]") .each (function () {
If ($(this). Val () = "") {$(this) .readers (".filename") .find (".filename") .val ("No file selected...");}
});
});
At this point, I believe that everyone on the "HTML form file selection box style how to customize" have a deeper understanding, might as well to the actual operation of it! Here is the website, more related content can enter the relevant channels to inquire, follow us, continue to learn!
Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.
Views: 0
*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.
Continue with the installation of the previous hadoop.First, install zookooper1. Decompress zookoope
"Every 5-10 years, there's a rare product, a really special, very unusual product that's the most un
© 2024 shulou.com SLNews company. All rights reserved.