๋ณธ๋ฌธ ๋ฐ”๋กœ๊ฐ€๊ธฐ
HTML5 & CSS3

[HTML5 & CSS3] ์‹ค์Šต - ๊ณ ์–‘์ด ์ž๋ž‘ ํŽ˜์ด์ง€ ๋งŒ๋“ค๊ธฐ

by ์ฝ”๋”ฉํ•˜๋Š” ๋ถ•์–ด 2021. 2. 15.
๋ฐ˜์‘ํ˜•

์กฐ๊ฑด)

ํผ์œผ๋กœ ์ œ์ž‘ํ• ๊ฒƒ!

 

๋“ค์–ด๊ฐˆ ๋‚ด์šฉโ–ผ

๊ณ ์–‘์ด ์ด๋ฆ„,

์ฃผ์†Œ์„ ํƒ(์„œ์šธ, ๋ถ€์‚ฐ, ๋Œ€๊ตฌ, ๊ด‘์ฃผ, ์ธ์ฒœ),

์„ฑ๋ณ„,

์ข‹์•„ํ•˜๋Š” ๊ฒƒ(์ƒ์„ , ๊ณ ๊ธฐ, ์šฐ์œ , ํ†ต์กฐ๋ฆผ),

์‚ฌ์ง„ ์ฒจ๋ถ€,

์ฃผ์ธ ์ด๋ฆ„,

๋ฉ”์ผ,

์ƒ์„ธ ์„ค๋ช…

 

โ€‹

 

<์†Œ์Šค>

<!DOCTYPE html>
<html lang="ko">
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1">
<title>๊ณ ์–‘์ด ์ž๋ž‘</title>
<style>
   * {
      margin: 0; /* ์™ธ๋ถ€ ์—ฌ๋ฐฑ */
      padding: 0; /* ํ…Œ๋‘๋ฆฌ์™€ ๋‚ด์šฉ ์‚ฌ์ด์˜ ์—ฌ๋ฐฑ */
      box-sizing: border-box;
   }
โ€‹
   #container {
      width: 100%; /* ๋„ˆ๋น„ */
   }
โ€‹
   header {
      width: 100%; /* ๋„ˆ๋น„ */
      height: 80px; /* ๋†’์ด */
      margin: 0; /* ์™ธ๋ถ€ ์—ฌ๋ฐฑ */
   }
โ€‹
   a {
      text-decoration: none;  
   }
โ€‹
   nav {
      height: 50px; /* ๋†’์ด */
      background:skyblue; /* ๋ฐฐ๊ฒฝ ์ƒ‰ */
   }
โ€‹
   #main-nav {
      list-style: none;
      margin-bottom: 10px; /* ์š”์†Œ ์ฃผ๋ณ€ ์—ฌ๋ฐฑ */
      padding: 10px; /* ํ…Œ๋‘๋ฆฌ์™€ ๋‚ด์šฉ ์‚ฌ์ด์˜ ์—ฌ๋ฐฑ */
      text-align: center; /* ๊ฐ€์šด๋ฐ ์ •๋ ฌ */
   }
โ€‹
   #main-nav li {
      display: inline-block;      
      color: #fff;
      font-family: "๋ง‘์€ ๊ณ ๋”•", ๋‹์›€;
      font-size: 0.9em;
      margin: 5px 15px; /* ์™ธ๋ถ€ ์—ฌ๋ฐฑ */
   }
โ€‹
   nav a:link, a:visited {
      color: #fff;
   }
โ€‹
   nav a:active {
      color:skyblue;
   }
โ€‹
   nav > ul > li {
      width: 15%; /* ๋„ˆ๋น„ */
      height: 40px; /* ๋†’์ด */
      margin-top: 30px; /* ์š”์†Œ ์ฃผ๋ณ€ ์—ฌ๋ฐฑ */
      position:relative; /* ์›๋ž˜ ์ž์‹ ์ด ์žˆ์–ด์•ผ๋  ์œ„์น˜๋ฅผ ๊ธฐ์ค€์œผ๋กœ ๋ฐฐ์น˜ */
      float:center; /* ์ •๋ ฌ */
   }
โ€‹
   nav > ul > li > a {
      display: block; /* ํ˜•ํƒœ */
      width: 25%px; /* ๋„ˆ๋น„ */
      height: 40px; /* ๋†’์ด */
      text-align: center; /* ๊ฐ€์šด๋ฐ ์ •๋ ฌ */
      line-height: 40px; /* ์ค„ ๊ฐ„๊ฒฉ */
      font-size: 18px; /* ๊ธ€์ž ํฌ๊ธฐ */
      color:black /* ๊ธ€์ž ์ƒ‰ */
   }
โ€‹
   nav > ul > li > a:hover {
      background-color: gray; /* ๋ฐฐ๊ฒฝ ์ƒ‰ */
      color: floralwhite; 
   }   
โ€‹
   body {
      margin: 0; /* ์™ธ๋ถ€ ์—ฌ๋ฐฑ */
      height: 100%; /* ๋†’์ด */
      background: whitesmoke; /* ๋ฐฐ๊ฒฝ ์ƒ‰ */
   }
โ€‹
   #wrapper {
      position: relative; /* ์›๋ž˜ ์ž์‹ ์ด ์žˆ์–ด์•ผ๋  ์œ„์น˜๋ฅผ ๊ธฐ์ค€์œผ๋กœ ๋ฐฐ์น˜ */
      height: 100%; /* ๋†’์ด */
   }
โ€‹
   #content {
      position: absolute;
      left: 50%;
      transform: translate(-50%);
      width: 460px; /* ๋„ˆ๋น„ */
   }
โ€‹
   h3 {
      margin: 19px 0 8px; /* ์™ธ๋ถ€ ์—ฌ๋ฐฑ */
      font-size: 14px; /* ๊ธ€์ž ํฌ๊ธฐ */
      font-weight: 700;
   }
โ€‹
   .box {
      display: block; /* ํ˜•ํƒœ */
      width: 100%; /* ๋„ˆ๋น„ */
      height: 51px; /* ๋†’์ด */
      border: solid 1px dimgray;
      padding: 10px 14px 10px 14px; /* ํ…Œ๋‘๋ฆฌ์™€ ๋‚ด์šฉ ์‚ฌ์ด์˜ ์—ฌ๋ฐฑ */
      box-sizing: border-box;
      background: #fff; /* ๋ฐฐ๊ฒฝ ์ƒ‰ */
      position: relative; /* ์›๋ž˜ ์ž์‹ ์ด ์žˆ์–ด์•ผ๋  ์œ„์น˜๋ฅผ ๊ธฐ์ค€์œผ๋กœ ๋ฐฐ์น˜ */
   }
โ€‹
   .int {
      display: block; /* ํ˜•ํƒœ */
      position: relative;
      width: 100%; /* ๋„ˆ๋น„ */
      height: 29px; /* ๋†’์ด */
      border: none;
      background: #fff; /* ๋ฐฐ๊ฒฝ ์ƒ‰ */
      font-size: 15px; /* ๊ธ€์ž ํฌ๊ธฐ */
   }
โ€‹
   input {
      font-family: '๋‹์›€';
   }
โ€‹
   .box.int_id {
      padding-right: 110px; /* ํ…Œ๋‘๋ฆฌ์™€ ๋‚ด์šฉ ์‚ฌ์ด์˜ ์—ฌ๋ฐฑ */
   }
โ€‹
   select {
      width: 100%; /* ๋„ˆ๋น„ */
      height: 29px; /* ๋†’์ด */
      font-size: 15px; /* ๊ธ€์ž ํฌ๊ธฐ */
      background: #fff 100% 50% no-repeat;
      background-size: 20px 8px;
      -webkit-appearance: none;
      display: inline-block; /* ํ˜•ํƒœ */
      text-align: start;
      border: none;
      cursor: default;
      font-family: '๋‹์›€';
   }
โ€‹
   .button_area {
      margin: 30px 0 91px; /* ์™ธ๋ถ€ ์—ฌ๋ฐฑ */
   }
โ€‹
   #button {
      width: 100%; /* ๋„ˆ๋น„ */
      padding: 21px 0 17px; /* ํ…Œ๋‘๋ฆฌ์™€ ๋‚ด์šฉ ์‚ฌ์ด์˜ ์—ฌ๋ฐฑ */
      border: 0;
      cursor: pointer;
      color: #fff;
      background-color: cornflowerblue;
      font-weight: 400;
      font-family: '๋‹์›€';
   }
โ€‹
   .button {
      cursor: pointer;
      background:gray; /* ๋ฐฐ๊ฒฝ ์ƒ‰ */
      text-decoration: none; /* ๊ธ€์ž ๊พธ๋ฐˆ */
      color: #666; /* ์ƒ‰๊น” */
   }
โ€‹
   .curl-top-left {
      display: inline-block; /* ํ˜•ํƒœ */
      position: relative;
      -webkit-tap-highlight-color: rgba(0, 0, 0, 0);
      transform: translateZ(0);
      box-shadow: 0 0 1px rgba(0, 0, 0, 0);
   }
โ€‹
   .curl-top-left:before {
      pointer-events: none;
      position: absolute;
      content: '';
      height: 0; /* ๋†’์ด */
      width: 0; /* ๋„ˆ๋น„ */
      top: 0;
      left: 0;
      background: white; /* ๋ฐฐ๊ฒฝ ์ƒ‰ */
   /* IE9 */
      background: linear-gradient(135deg, white 45%, #aaa 50%, #ccc 56%, white 80%);
      filter: progid:DXImageTransform.Microsoft.gradient(GradientType=0,startColorstr='#ffffff', endColorstr='#000000');
   /*For IE7-8-9*/
      z-index: 1000;
      box-shadow: 1px 1px 1px rgba(0, 0, 0, 0.4);
      transition-duration: 0.3s;
      transition-property: width height;
   }
โ€‹
   .curl-top-left:hover:before {
      width: 16px; /* ๋„ˆ๋น„ */
      height: 16px; /* ๋†’์ด */
   }   
</style>
</head>
<body>
<div id="container">
<header>
<nav>
   <ul id="main-nav">
      <li><a href='#'><b>์‚ฌ์ดํŠธ ์†Œ๊ฐœ</b></a></li>                  
      <li><a href='catinfo.html'><b>๊ณ ์–‘์ด ๋ถ„์–‘</b></a></li>
      <li><a href='catshow.html'><h1>๊ณ ์–‘์ด ์ž๋ž‘</h1></a></li>
      <li><a href='#'><b>๊ณ ๊ฐ์„ผํ„ฐ</b></a></li>
   </ul>
</nav>
</header>
<div id="wrapper">
<form id="form" action="-" method="post"> 
<div id="content">   
   <div>
      <h3 class="join_title">
         <label for="cat_name">์ด๋ฆ„</label>
      </h3>
      <span class="box int_id">
         <input type="text" id="cat_name" class="int" name="cat_name">
      </span>
   </div>
                    
   <div>
      <h3 class="join_title"><label for="add">์ฃผ์†Œ</label></h3>
         <span class="box">
            <select id="add" class="sel" name = "add">
               <option>์ฃผ์†Œ</option>
               <option value="seoul">์„œ์šธ</option>
               <option value="daejeon">๋Œ€์ „</option>
               <option value="daegu">๋Œ€๊ตฌ</option>
               <option value="gwangju">๊ด‘์ฃผ</option>
               <option value="incheon">์ธ์ฒœ</option>
            </select>                            
         </span>
   </div>
โ€‹
   <div>
      <h3 class="join_title"><label for="gender">์„ฑ๋ณ„</label></h3>
         <span class="box gender_code">
            <select id="gender" class="sel" name="catsgender">
               <option>์„ฑ๋ณ„</option>
               <option value="M">๋‚จ์ž</option>
               <option value="F">์—ฌ์ž</option>
            </select>                            
         </span>
   </div>
                    
   <div>
      <h3 class="join_title"><label for="gender">์ข‹์•„ํ•˜๋Š” ๊ฒƒ</label></h3>
         <span class="box gender_code">
            <select id="gender" class="sel" name="catslike">
               <option>์ข‹์•„ํ•˜๋Š” ๊ฒƒ</option>
               <option value="fish">์ƒ์„ </option>
               <option value="meat">๊ณ ๊ธฐ</option>
               <option value="milk">์šฐ์œ </option>
               <option value="cannedfood">ํ†ต์กฐ๋ฆผ</option>
            </select>                            
         </span>
   </div>
                    
   <div>
      <h3 class="join_title">
         <label for="id">์ฃผ์ธ์ด๋ฆ„</label>
      </h3>
         <span class="box int_id">
            <input type="text" id="id" class="int" maxlength="20" name="master_name">
         </span>
   </div>
                    
   <div>
      <h3 class="join_title">
         <label for="id">๋ฉ”์ผ</label>
      </h3>
         <span class="box int_id">
            <input type="text" id="email" class="int" name="email">
         </span>
   </div>
                    
   <div>
      <h3 class="join_title">
         <label for="id">์ƒ์„ธ์„ค๋ช…</label>
      </h3>
         <textarea rows="20" cols="65" name="content"></textarea>
   </div>
                    
   <div>
      <h3 class="join_title">
         <label for="file">ํŒŒ์ผ์ฒจ๋ถ€</label>
      </h3>
         <input type="file" name="file" id="file">
   </div>
โ€‹
   <div class="button_area">
      <button type="submit" id="button">
         <span><b>์ž๋ž‘ํ•˜๊ธฐ</b></span>
      </button>
   </div>
</div> 
</form>
</div> 
</body>
</html>
๋ฐ˜์‘ํ˜•

๋Œ“๊ธ€