今日学习:
html表单;
1 <!DOCTYPE html> 2 <html lang="en"> 3 <head> 4 <meta charset="UTF-8"> 5 <title>Registration Form</title> 6 <link rel="stylesheet" href="styles-form.css" /> 7 </head> 8 <body> 9 <h1>Registration Form</h1> 10 <p>Please fill out this form with the required information</p> 11 <form method="post" action='https://register-demo.freecodecamp.org'> 12 <fieldset> 13 <label for="first-name">Enter Your First Name: <input id="first-name" name="first-name" type="text" required /></label> 14 <label for="last-name">Enter Your Last Name: <input id="last-name" name="last-name" type="text" required /></label> 15 <label for="email">Enter Your Email: <input id="email" name="email" type="email" required /></label> 16 <label for="new-password">Create a New Password: <input id="new-password" name="new-password" type="password" pattern="[a-z0-5]{8,}" required /></label> 17 </fieldset> 18 <fieldset> 19 <label for="personal-account"><input id="personal-account" type="radio" name="account-type" class="inline" /> Personal Account</label> 20 <label for="business-account"><input id="business-account" type="radio" name="account-type" class="inline" /> Business Account</label> 21 <label for="terms-and-conditions"> 22 <input id="terms-and-conditions" type="checkbox" required name="terms-and-conditions" class="inline" /> I accept the <a href="https://www.freecodecamp.org/news/terms-of-service/">terms and conditions</a> 23 </label> 24 </fieldset> 25 <fieldset> 26 <label for="profile-picture">Upload a profile picture: <input id="profile-picture" type="file" name="file" /></label> 27 <label for="age">Input your age (years): <input id="age" type="number" name="age" min="13" max="120" /></label> 28 <label for="referrer">How did you hear about us? 29 <select id="referrer" name="referrer"> 30 <option value="">(select one)</option> 31 <option value="1">freeCodeCamp News</option> 32 <option value="2">freeCodeCamp YouTube Channel</option> 33 <option value="3">freeCodeCamp Forum</option> 34 <option value="4">Other</option> 35 </select> 36 </label> 37 <label for="bio">Provide a bio: 38 <textarea id="bio" name="bio" rows="3" cols="30" placeholder="I like coding on the beach..."></textarea> 39 </label> 40 </fieldset> 41 <input type="submit" value="Submit" /> 42 </form> 43 </body> 44 </html>
CSS:
1 body { 2 width: 100%; 3 height: 100vh; 4 margin: 0; 5 background-color: #1b1b32; 6 color: #f5f6f7; 7 font-family: Tahoma; 8 font-size: 16px; 9 } 10 11 h1, p { 12 margin: 1em auto; 13 text-align: center; 14 } 15 16 form { 17 width: 60vw; 18 max-width: 500px; 19 min-width: 300px; 20 margin: 0 auto; 21 padding-bottom: 2em; 22 } 23 24 fieldset { 25 border: none; 26 padding: 2rem 0; 27 border-bottom: 3px solid #3b3b4f; 28 } 29 30 fieldset:last-of-type { 31 border-bottom: none; 32 } 33 34 label { 35 display: block; 36 margin: 0.5rem 0; 37 } 38 39 input, 40 textarea, 41 select { 42 margin: 10px 0 0 0; 43 width: 100%; 44 min-height: 2em; 45 } 46 47 input, textarea { 48 background-color: #0a0a23; 49 border: 1px solid #0a0a23; 50 color: #ffffff; 51 } 52 53 .inline { 54 width: unset; 55 margin: 0 0.5em 0 0; 56 vertical-align: middle; 57 } 58 59 input[type="submit"] { 60 display: block; 61 width: 60%; 62 margin: 1em auto; 63 height: 2em; 64 font-size: 1.1rem; 65 background-color: #3b3b4f; 66 border-color: white; 67 min-width: 300px; 68 } 69 70 input[type="file"] { 71 padding: 1px 2px; 72 } 73 74 a { 75 color:dfdfe2; 76 }
JAVA学习内容:
明确Swing的用途,熟悉Swing的常用组件。
掌握JFrame窗体和JDialog对话框的使用方法。
熟练掌握常用的4种布局管理器。
掌握JPanel面板和JScrollPane面板的使用方法。
明确使用JPanel面板时,须依赖JFrame窗体。
明确JScrollPane滚动面板不能使用布局管理器,且只能容纳一个组件。
明日计划:
复习之前学的html和css内容,继续Java学习
遇到困难:东西多
标签:color,border,表单,width,汇报,html,input,margin From: https://www.cnblogs.com/qmz-znv2/p/17578435.html