引用自己創建的css樣式表_如何使用CSS創建聯系表

引用自己創建的css樣式表

First we create the HTML elements - input fields for First Name, Last Name, Email and a Text Area for the message.

首先,我們創建HTML元素-名字,姓氏,電子郵件和消息的文本區域的輸入字段。

Later we apply CSS styles to make the form visually appealing.

后來,我們應用CSS樣式使表格具有視覺吸引力。

HTML部分 (The HTML part)

The HTML section has a div with class container with the heading h3Contact Form

HTML部分的div帶有類container ,標題為h3Contact Form

The form with name contact_form contains input fields for:

名稱為contact_form的表單包含以下輸入字段:

  • First Name

    名字
  • Last Name

  • Email

    電子郵件
  • Message

    信息

A div with class center to align the items center. An input type submit to submit the form.The required attribute in the text fields are checked for value on submission.

具有班次center的div以使項目中心對齊。 一個inputsubmit提交form.The required在文本字段屬性是為在提交值檢查。

<div class="container"><h3>Contact Form</h3><form action="#" name="contact_form"><label for="first_name">First Name</label><input name="first_name" type="text" required placeholder="John"/><br><label for="last_name">Last Name</label><input name="last_name" type="text" required placeholder="Doe"/><br><label for="email">Email</label><input name="email" type="email" required placeholder="you@domain.com"/><br><label for="message">Message</label><br><textarea name="message" cols="30" rows="10" placeholder="Enter your message here ..." required> </textarea><div class="center"><input type="submit" value="Submit"></div></form>	
</div>

CSS部分 (The CSS part)

/* Importing the Roboto font from Google Fonts. */
@import url("https://fonts.googleapis.com/css?family=Roboto:400");/* Set font of all elements to 'Roboto' */
* {font-family: 'Roboto', sans-serif;font-weight: 400;
}/* Remove outline of all elements on focus */
*:focus {outline: 0;
}body {background: #263238;  /* Set background color to #263238*/
}h3 {text-align: center;
}/* Add styles to 'container' class */
.container {padding: 12px 24px 24px 24px;margin: 48px 12px;background: #E3F2FD;border-radius: 4px;
}/* Add styles to 'label' selector */
label {font-size: 0.85em;margin-left: 12px;
}/* Add styles to 'input' and 'textarea' selectors */
input[type=text],input[type=email], textarea {width: 100%;padding: 12px;border: 1px solid #ccc;border-radius: 4px;box-sizing: border-box;margin-top: 6px;margin-bottom: 16px;resize: vertical;
}/* Add styles to show 'focus' of selector */
input[type=text]:focus,input[type=email]:focus, textarea:focus {border: 1px solid green;
}/* Add styles to the submit button */
input[type=submit] {background: #64B5F6;margin: 0 auto;outline: 0;color: white;border: 0;padding: 12px 24px;border-radius: 4px;transition: all ease-in-out 0.1s;position: relative;display: inline-block;text-align: center;
}/* Add styles for 'focus' property */
input[type=submit]:focus {background: #A5D6A7;color: whitesmoke;
}/* Style 'hover' property */
input[type=submit]:hover {background: #2196F3;
}/* Align items to center of the 'div' with the class 'center' */
.center {text-align: center;
}

輸出量 (Output)

更多信息: (More Information:)

Visit the FreeCodeCamp - Contact Form on Codepen.io

訪問FreeCodeCamp -聯系表上Codepen.io

翻譯自: https://www.freecodecamp.org/news/how-to-create-a-contact-form-with-css/

引用自己創建的css樣式表

本文來自互聯網用戶投稿,該文觀點僅代表作者本人,不代表本站立場。本站僅提供信息存儲空間服務,不擁有所有權,不承擔相關法律責任。
如若轉載,請注明出處:http://www.pswp.cn/news/390655.shtml
繁體地址,請注明出處:http://hk.pswp.cn/news/390655.shtml
英文地址,請注明出處:http://en.pswp.cn/news/390655.shtml

如若內容造成侵權/違法違規/事實不符,請聯系多彩編程網進行投訴反饋email:809451989@qq.com,一經查實,立即刪除!

相關文章

leetcode 1449. 數位成本和為目標值的最大數字(dp)

這是我參與更文挑戰的第12天 &#xff0c;活動詳情查看更文挑戰 題目 給你一個整數數組 cost 和一個整數 target 。請你返回滿足如下規則可以得到的 最大 整數&#xff1a; 給當前結果添加一個數位&#xff08;i 1&#xff09;的成本為 cost[i] &#xff08;cost 數組下標…

風能matlab仿真_風能產量預測—深度學習項目

風能matlab仿真DL DATATHON- AI4ImpactDL DATATHON- AI4影響 Published by Team AI Traders — Suyash Lohia, Nguyen Khoi Phan, Nikunj Taneja, Naman Agarwal and Mihir GuptaAI交易員團隊發布 -Suyash Lohia&#xff0c;Nguyen Khoi Phan&#xff0c;Nikonj Taneja&#x…

android JNI調用(Android Studio 3.0.1)(轉)

最近回頭復習了一下android 的jni調用&#xff0c;卻發現按以前的方法調用失敗&#xff0c;一怒之下就重新摸索&#xff0c;碰了幾次壁&#xff0c;發現網上好多教程都不能成功調用&#xff0c;于是記錄一下現在AS版本成功好用的調用方法。 這里設定你的ndk已經下載并且設置沒問…

安卓源碼 代號,標簽和內部版本號

SetupSecurityPortingTuningCompatibilityReference轉到源代碼Getting Started OverviewCodelines, Branches, and ReleasesCodenames, Tags, and Build NumbersProject RolesBrand GuidelinesLicensesFAQSite UpdatesDownloading and Building RequirementsEstablishing a Bui…

git 列出標簽_Git標簽介紹:如何在Git中列出,創建,刪除和顯示標簽

git 列出標簽Tagging lets developers mark important checkpoints in the course of their projects development. For instance, software release versions can be tagged. (Ex: v1.3.2) It essentially allows you to give a commit a special name(tag).通過標記&#xff…

leetcode 278. 第一個錯誤的版本(二分)

題目 你是產品經理&#xff0c;目前正在帶領一個團隊開發新的產品。不幸的是&#xff0c;你的產品的最新版本沒有通過質量檢測。由于每個版本都是基于之前的版本開發的&#xff0c;所以錯誤的版本之后的所有版本都是錯的。 假設你有 n 個版本 [1, 2, …, n]&#xff0c;你想找…

騰訊哈勃_用Python的黑客統計資料重新審視哈勃定律

騰訊哈勃Simple OLS Regression, Pairs Bootstrap Resampling, and Hypothesis Testing to observe the effect of Hubble’s Law in Python.通過簡單的OLS回歸&#xff0c;配對Bootstrap重采樣和假設檢驗來觀察哈勃定律在Python中的效果。 In this post, we will revisit Hub…

JAVA中動態編譯的簡單使用

一、引用庫 pom文件中申明如下&#xff1a; <dependencies><!-- https://mvnrepository.com/artifact/junit/junit --><dependency><groupId>junit</groupId><artifactId>junit</artifactId><version>4.12</version><…

程序員實用小程序_我從閱讀《實用程序員》中學到了什么

程序員實用小程序In short: old but gold.簡而言之&#xff1a;古老而又黃金。 Published in 1999, The Pragmatic Programmer is a book about how to become a Pragmatic Programmer. Which really means a ‘Good Programmer’. 《實用程序員》于1999年出版&#xff0c;是一…

leetcode 5786. 可移除字符的最大數目(二分法)

題目 給你兩個字符串 s 和 p &#xff0c;其中 p 是 s 的一個 子序列 。同時&#xff0c;給你一個元素 互不相同 且下標 從 0 開始 計數的整數數組 removable &#xff0c;該數組是 s 中下標的一個子集&#xff08;s 的下標也 從 0 開始 計數&#xff09;。 請你找出一個整數…

如何使用Picterra的地理空間平臺分析衛星圖像

From April-May 2020, Sentinel-Hub had organized the third edition of their custom script competition. The competition was organized in collaboration with the Copernicus EU Earth Observation programme, the European Space Agency and AI4EO consortium.從2020年…

df -l查看本地文件系統

df -l, --locallimit listing to local file systems 轉載于:https://www.cnblogs.com/jonathanyue/p/9301222.html

在Packet Tracer中路由器靜態路由配置

實驗目標&#xff1a;<1>掌握靜態路由的配置方法和技巧<2>掌握通過靜態路由方式實現網絡的連通性<3>熟悉廣域網線纜的鏈接方式技術原理&#xff1a;<1>路由器屬于網絡層設備&#xff0c;能夠根據IP包頭的信息&#xff0c;選擇一條最佳路徑&#xff0c;…

python示例_帶有示例的Python功能指南

python示例Python函數簡介 (Introduction to Functions in Python) A function allows you to define a reusable block of code that can be executed many times within your program.函數允許您定義一個可重用的代碼塊&#xff0c;該代碼塊可以在程序中多次執行。 Function…

leetcode 852. 山脈數組的峰頂索引(二分查找)

題目 符合下列屬性的數組 arr 稱為 山脈數組 &#xff1a; arr.length > 3 存在 i&#xff08;0 < i < arr.length - 1&#xff09;使得&#xff1a; arr[0] < arr[1] < … arr[i-1] < arr[i] arr[i] > arr[i1] > … > arr[arr.length - 1] 給你由…

hopper_如何利用衛星收集的遙感數據輕松對蚱hopper中的站點進行建模

hopper建筑學與數據科學 (Architectonics and Data Science) Understanding the site and topography are crucial first step of any architectural project. Site modelling can become very daunting, expensive, or just cumbersome, often having to use various software…

Git 倉庫代碼遷移步驟記錄

遷移遠程倉庫 // 克隆舊倉庫鏡像 git clone --mirror [oldRepoUrl]// 添加新倉庫地址 cd the_repo git remote add [remoteName] [newRepoUrl]// 推到新的遠程庫 git push -f --tags [remoteName] refs/heads/*:refs/heads/* 復制代碼中括號中的名稱需根據自己項目需求替換 更新…

TensorFlow MNIST 入門 代碼

其實就是按照TensorFlow中文教程的內容一步步跟著敲的代碼。 不過在運行代碼的時候遇到代碼中加載不到MNIST數據資源&#xff0c;似乎是被墻了&#xff08;(⊙﹏⊙)b&#xff09; 于是自己手動下載了數據包&#xff0c;放到 MNIST_data/ 文件夾下&#xff0c;代碼就能正常運轉了…

JavaScript中的基本表單驗證

In the past, form validation would occur on the server, after a person had already entered in all of their information and pressed the submit button. 過去&#xff0c;表單驗證會在一個人已經輸入了所有信息并按下“提交”按鈕之后在服務器上進行。 If the informa…

leetcode 877. 石子游戲(dp)

題目 亞歷克斯和李用幾堆石子在做游戲。偶數堆石子排成一行&#xff0c;每堆都有正整數顆石子 piles[i] 。 游戲以誰手中的石子最多來決出勝負。石子的總數是奇數&#xff0c;所以沒有平局。 亞歷克斯和李輪流進行&#xff0c;亞歷克斯先開始。 每回合&#xff0c;玩家從行的…