好看的表單HTML+CSS樣式,可直接執行
一個好看的表單 前端靜態頁面:
<!DOCTYPE html> <html lang="en"> <head> <meta charset="UTF-8"> <title>首頁</title> <style type="text/css"> /* Basic Grey */ .basic-grey { margin-left:auto; margin-right:auto; max-width: 500px; background: #F7F7F7; padding: 25px 15px 25px 10px; font: 12px Georgia, "Times New Roman", Times, serif; color: #888; text-shadow: 1px 1px 1px #FFF; border:1px solid #E4E4E4; } .basic-grey h1 { font-size: 25px; padding: 0px 0px 10px 40px; display: block; border-bottom:1px solid #E4E4E4; margin: -10px -15px 30px -10px; color: #888; } .basic-grey h1>span { display: block; font-size: 11px; } .basic-grey label { display: block; margin: 0px; } .basic-grey label>span { float: left; width: 20%; text-align: right; padding-right: 10px; margin-top: 10px; color: #888; } .basic-grey input[type="text"], .basic-grey input[type="email"], .basic-grey textarea, .basic-grey select { border: 1px solid #DADADA; color: #888; height: 30px; margin-bottom: 16px; margin-right: 6px; margin-top: 2px; outline: 0 none; padding: 3px 3px 3px 5px; width: 70%; font-size: 12px; line-height:15px; box-shadow: inset 0px 1px 4px #ECECEC; -moz-box-shadow: inset 0px 1px 4px #ECECEC; -webkit-box-shadow: inset 0px 1px 4px #ECECEC; } .basic-grey textarea{ padding: 5px 3px 3px 5px; } .basic-grey select { /* background: #FFF url('down-arrow.png') no-repeat right;*/ /* background: #FFF url('down-arrow.png') no-repeat right);*/ appearance:none; -webkit-appearance:none; -moz-appearance: none; text-indent: 0.01px; text-overflow: ''; width: 70%; height: 35px; line-height: 25px; } .basic-grey textarea{ height:100px; } .basic-grey .button { background: #E27575; border: none; padding: 10px 25px 10px 25px; color: #FFF; box-shadow: 1px 1px 5px #B6B6B6; border-radius: 3px; text-shadow: 1px 1px 1px #9E3F3F; cursor: pointer; } .basic-grey .button:hover { background: #CF7A7A } </style> </head> <body> <form action="" method="post"> <div class="basic-grey"> <h1>Contact Form <span>Please fill all the texts in the fields.</span> </h1> <label> <span>Themplate :</span> <select id="template" name="themplate" οnchange="changeStyle();"> <option value="basic-grey">basic-grey</option> <option value="elegant-aero">elegant-aero</option> <option value="smart-green">smart-green</option> <option value="white-pink">white-pink</option> <option value="bootstrap-frm">bootstrap-frm</option> <option value="dark-matter">dark-matter</option> </select> </label> <label> <span>Your Port :</span> <input id="port" type="text" name="port" placeholder="The port number you want to open" /> </label> <label> <span>Your Port :</span> <input id="ip" type="text" name="port" placeholder="The port number you want to open" /> </label> <label> <span>Your Email :</span> <input id="email" type="email" name="email" placeholder="Valid Email Address" /> </label> <label> <span>Message :</span> <textarea id="message" name="message" placeholder="Your Message to Us"></textarea> </label> <label> <span>Subject :</span><select name="selection"> <option value="Job Inquiry">Job Inquiry</option> <option value="General Question">General Question</option> </select> </label> <label> <span> </span> <input type="button" class="button" value="Send" /> </label> </div> </form> <script> function changeStyle() { var template = document.getElementById("template"); var index = template.selectedIndex; var templatevalue = template.options[index].value; var templatecss = document.getElementById("templatecss"); templatecss.setAttribute("href","css/" + templatevalue + ".css"); document.getElementsByTagName("form")[0].setAttribute("class",templatevalue); } </script> </body>
相關文章
- 【CSS】關於表單樣式CSS
- 用html+css樣式,畫背景圖HTMLCSS
- 滑鼠樣式/表單輪廓線
- 「HTML+CSS」--自定義按鈕樣式【004】HTMLCSS
- 「HTML+CSS」--自定義按鈕樣式【003】HTMLCSS
- 「HTML+CSS」--自定義按鈕樣式【001】HTMLCSS
- 「HTML+CSS」--自定義按鈕樣式【002】HTMLCSS
- HTML樣式插入、連結、表單標籤HTML
- QSpinBox樣式表
- easyExcel多行表頭設定不同樣式和特定單元格設定樣式的實現Excel
- 前端開發的福音!這個功能可直接從藍湖貼上css樣式前端CSS
- 怎樣停止一個正在執行的執行緒執行緒
- JS是怎樣執行的JS
- Webpack 是怎樣執行的?Web
- vue基礎-動態樣式&表單繫結&vue響應式原理Vue
- qt樣式表未生效QT
- WebKit Insie: Active 樣式表WebKit
- QSpinBox樣式表設定
- CSS樣式表繼承CSS繼承
- Webpack 是怎樣執行的?(一)Web
- SingleThreadExecutor(單執行緒執行器)thread執行緒
- jQuery Validate自定義表單元素驗證通過和不通過的樣式jQuery
- CSS 樣式清單整理CSS
- 簡單的執行緒池執行緒
- CSS——行高、字型、文字的樣式CSS
- CSS——CSS 給盒子、背景、連結、列表、表單、表格等加樣式CSS
- 執行緒池是怎樣工作的?執行緒
- 讀《mysql是怎樣執行的》有感MySql
- 原來JavaScript是這樣執行的JavaScript
- IDEA 這樣設定,好看到爆炸!!!Idea
- echarts圖表樣式轉換Echarts
- CSS:層疊樣式表—positionCSS
- vue圖表樣式網站Vue網站
- MySQL 執行原理【表】MySql
- WebKit Inside: CSS 樣式表的匹配時機WebKitIDECSS
- 多執行緒Demo學習(執行緒的同步,簡單的執行緒通訊)執行緒
- HTML+CSS實現下拉選單HTMLCSS
- SAP UI5 setProperty 的執行邏輯單步調式和分析UI