css实现一个简洁背景透明的表单效果代码
代码语言:html
所属分类:表单美化
代码描述:css实现一个简洁背景透明的表单效果代码
下面为部分代码预览,完整代码请点击下载或在bfwstudio webide中打开
<!DOCTYPE html> <html> <head> <!-- for-mobile-apps --> <meta name="viewport" content="width=device-width, initial-scale=1" /> <meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> <style> /* reset */ html,body,div,span,applet,object,iframe,h1,h2,h3,h4,h5,h6,p,blockquote,pre,a,abbr,acronym,address,big,cite,code,del,dfn,em,img,ins,kbd,q,s,samp,small,strike,strong,sub,sup,tt,var,b,u,i,dl,dt,dd,ol,nav ul,nav li,fieldset,form,label,legend,table,caption,tbody,tfoot,thead,tr,th,td,article,aside,canvas,details,embed,figure,figcaption,footer,header,hgroup,menu,nav,output,ruby,section,summary,time,mark,audio,video { margin: 0; padding: 0; border: 0; font-size: 100%; font: inherit; vertical-align: baseline; } article, aside, details, figcaption, figure,footer, header, hgroup, menu, nav, section { display: block; } ol,ul { list-style: none; margin: 0px; padding: 0px; } blockquote,q { quotes: none; } blockquote:before,blockquote:after,q:before,q:after { content: ''; content: none; } table { border-collapse: collapse; border-spacing: 0; }/* start editing from here */a { text-decoration: none; } .txt-rt { text-align: right; }/* text align right */.txt-lt { text-align: left; }/* text align left */.txt-center { text-align: center; }/* text align center */.float-rt { float: right; }/* float right */.float-lt { float: left; }/* float left */.clear { clear: both; }/* clear float */.pos-relative { position: relative; }/* Position Relative */.pos-absolute { position: absolute; }/* Position Absolute */.vertical-base { vertical-align: baseline; }/* vertical align baseline */.vertical-top { vertical-align: top; }/* vertical align top */nav.vertical ul li { display: block; }/* vertical menu */nav.horizontal ul li { display: inline-block; }/* horizontal menu */img { max-width: 100%; }/*end reset*/html, body { font-family: Verdana; font-size: 100%; 'Cabin' , sans-serif; background: url(//repo.bfw.wiki/bfwrepo/image/607aa1b0d81d0.png) no-repeat 0px 0px; background-size: cover; -webkit-background-size: cover; -moz-background-size: cover; -o-background-size: cover; -ms-background-size: cover; background-attachment: fixed; } h1,h2,h3,h4,h5,h6,a,p,input,textarea { 'Cabin' , sans-serif; margin: 0; } ul,label { margin: 0; padding: 0; } body a:hover,body a { text-decoration: none; }/*-- main --*/.agileits_copyright p { font-size: 1em; color: #fff; margin: 4em 0 0; line-height: 1.8em; text-align: center; } .agileits_copyright p a { color: #212121; text-decoration: none; } .agileits_copyright p a:hover { color: #fff; } input[type="submit"],.agileits_copyright p a { transition: .5s ease-in; -webkit-transition: .5s ease-in; -moz-transition: .5s ease-in; -o-transition: .5s ease-in; -ms-transition: .5s ease-in; } .main { padding: 4em 0; } .main h1 { text-align: center; color: #fff; font-size: 2.5em; margin-bottom: 1.5em; }/*-- input-effect --*/option { color: #999; font-size: 14px; } .styled-input { float: left; margin: 1em 0 2em; position: relative; width: 31%; } .styled-input label { color: #fff; padding: 0.5em .9em; position: absolute; top: 0; left: 0; -webkit-transition: all 0.3s; -moz-transition: all 0.3s; transition: all 0.3s; pointer-events: none; font-weight: 400; font-size: 1em; display: block; line-height: 1em; } .styled-input input ~ span,.styled-input textarea ~ span,.styled-input select#country ~ span { display: block; width: 0; height: 1px; background: #999; position: absolute; bottom: 0; left: 0; -webkit-transition: all 0.125s; -moz-transition: all 0.125s; transition: all 0.125s; } .styled-input textarea ~ span { bottom: 4px !important; } .styled-input input:focus,.styled-input textarea:focus,,.styled-input select#country:focus { outline: 0; } .styled-input input:focus ~ span,.styled-input textarea:focus ~ span,.styled-input select#country:focus ~ span { width: 100%; -webkit-transition: all 0.075s; -moz-transition: all 0.075s; transition: all 0.075s; } .styled-input select#country:focus ~ span { width: 89% !important; }/*-- //input-effect --*/.agileinfo_main_grid { width: 60%; margin: 0 auto; border: 15px solid #fff; padding: 2em; background: rgba(0, 0, 0, 0.72); } .agileinfo_main_grid input[type="text"],select#country,.w3_styled_input_textarea textarea,.agileinfo_main_grid input[type="email"] { font-size: 1em; color: #fff; padding: 0.5em 1em; border: 0; width: 89%; border-bottom: 1px solid #535353; background: none; outline: none; } .agileinfo_main_grid input[type="text"],.w3_styled_input_textarea textarea,.agileinfo_main_grid input[type="email"] { -webkit-appearance: none; } .w3_styled_input_textarea textarea { width: 97% !important; min-height: 65px; resize: none; } .styled-input:nth-child(2),.styled-input:nth-child(6) { margin-left: 2em; margin-right: 2em; } .w3agile_budget h4 { font-size: 1.3em; color: #FFAE00; margin-bottom: 1.5em; text-transform: uppercase; } .rangeslider,.rangeslider__fill { display: block; -moz-box-shadow: inset 0px 1px 3px rgba(0, 0, 0, 0.3); -webkit-box-shadow: inset 0px 1px 3px rgba(0, 0, 0, 0.3); box-shadow: inset 0px 1px 3px rgba(0, 0, 0, 0.3); } .rangeslider { background: #e6e6e6; position: relative; } .rangeslider--horizontal { height: 30px; width: 65%; float: left; } .rangeslider--vertical.........完整代码请登录后点击上方下载按钮下载查看
网友评论0