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

歡迎訪問 生活随笔!

生活随笔

當前位置: 首頁 > 前端技术 > CSS >内容正文

CSS

引用自己创建的css样式表_如何使用CSS创建联系表

發布時間:2023/11/29 CSS 51 豆豆
生活随笔 收集整理的這篇文章主要介紹了 引用自己创建的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 h3 ”Contact Form

HTML部分的div帶有類container ,標題為h3 “ Contact 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以使項目中心對齊。 一個input型submit提交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樣式表

總結

以上是生活随笔為你收集整理的引用自己创建的css样式表_如何使用CSS创建联系表的全部內容,希望文章能夠幫你解決所遇到的問題。

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