日韩性视频-久久久蜜桃-www中文字幕-在线中文字幕av-亚洲欧美一区二区三区四区-撸久久-香蕉视频一区-久久无码精品丰满人妻-国产高潮av-激情福利社-日韩av网址大全-国产精品久久999-日本五十路在线-性欧美在线-久久99精品波多结衣一区-男女午夜免费视频-黑人极品ⅴideos精品欧美棵-人人妻人人澡人人爽精品欧美一区-日韩一区在线看-欧美a级在线免费观看

歡迎訪問 生活随笔!

生活随笔

當前位置: 首頁 > 编程资源 > 编程问答 >内容正文

编程问答

form表单样式

發布時間:2024/8/1 编程问答 30 豆豆
生活随笔 收集整理的這篇文章主要介紹了 form表单样式 小編覺得挺不錯的,現在分享給大家,幫大家做個參考.

我們會經常遇到許多密碼的登錄和注冊, 這個時候我們就可以先寫好一個模塊進行參考

源代碼如下:

<!DOCTYPE html>

<html>
<head>
? ? <meta charset="UTF-8">
? ? <title>表單樣式</title>
? ? <style type="text/css">
? ? ? ? * {
? ? ? ? ? ? font-size: 12px;
? ? ? ? ? ? margin: 0;
? ? ? ? ? ? padding: 0;
? ? ? ? }


? ? ? ? input {
? ? ? ? ? ? width: 320px;
? ? ? ? ? ? height: 24px;
? ? ? ? ? ? border: 1px solid #999;
? ? ? ? ? ? border-radius: 4px;
? ? ? ? }


? ? ? ? .formErr {
? ? ? ? ? ? border: 1px solid red;
? ? ? ? }


? ? ? ? .form .label {
? ? ? ? ? ? display: block;
? ? ? ? ? ? float: left;
? ? ? ? ? ? width: 128px;
? ? ? ? ? ? height: 40px;
? ? ? ? ? ? line-height: 40px;
? ? ? ? ? ? text-align: end;
? ? ? ? }


? ? ? ? .form .txt {
? ? ? ? ? ? display: block;
? ? ? ? ? ? float: left;
? ? ? ? ? ? width: 340px;
? ? ? ? ? ? height: 40px;
? ? ? ? ? ? line-height: 40px;
? ? ? ? ? ? padding-left: 16px;
? ? ? ? }


? ? ? ? .form button {
? ? ? ? ? ? width: 56px;
? ? ? ? ? ? height: 24px;
? ? ? ? ? ? background-color: green;
? ? ? ? ? ? border: 0;
? ? ? ? ? ? border-radius: 4px;
? ? ? ? ? ? color: white;
? ? ? ? }


? ? ? ? .form .errTips {
? ? ? ? ? ? width: 226px;
? ? ? ? ? ? background-color: lightpink;
? ? ? ? ? ? color: darkred;
? ? ? ? ? ? border-radius: 4px;
? ? ? ? ? ? margin-left: 144px;
? ? ? ? ? ? margin-top: 6px;
? ? ? ? ? ? margin-bottom: 4px;
? ? ? ? ? ? padding: 16px 48px;
? ? ? ? }
? ? </style>
</head>
<body>
<div class="form">
? ? <div>
? ? ? ? <span class="label">用戶名</span>
? ? ? ? <span class="txt"><input type="text" placeholder="6-20個字符"/></span>
? ? </div>
? ? <div style="clear: both"></div>
? ? <div>
? ? ? ? <span class="label">密碼</span>
? ? ? ? <span class="txt"><input type="password" placeholder="6-20個字符" class="formErr"/></span>
? ? </div>
? ? <div style="clear: both"></div>
? ? <div>
? ? ? ? <span class="label">重復密碼</span>
? ? ? ? <span class="txt"><input type="password" placeholder="再次輸入密碼"/></span>
? ? </div>
? ? <div style="clear: both"></div>
? ? <div class="errTips">
? ? ? ? <ul>
? ? ? ? ? ? <li>密碼長度不能小于6個字符!</li>
? ? ? ? ? ? <li>密碼不能為空!</li>
? ? ? ? ? ? <li>兩次密碼輸入不一致!</li>
? ? ? ? </ul>
? ? </div>
? ? <div style="clear: both"></div>
? ? <div>
? ? ? ? <span class="label"></span>
? ? ? ? <span class="txt"><button>提交</button></span>
? ? </div>
? ? <div style="clear: both"></div>
</div>
</body>
</html>

總結

以上是生活随笔為你收集整理的form表单样式的全部內容,希望文章能夠幫你解決所遇到的問題。

如果覺得生活随笔網站內容還不錯,歡迎將生活随笔推薦給好友。