랜덤 선택(1)

jb kim·2021년 12월 22일
0

Web Projects

목록 보기
24/50

html

    <div class="container">
      <h3>
        선택지를 입력하세요 콤마(,)로 분리해서 입력. <br />
        마지막 입력후 엔터
      </h3>
      <textarea placeholder="여기에 입력..." id="textarea"></textarea>

      <div id="tags">
        <span class="tag"></span>
        <span class="tag"></span>
        <span class="tag"></span>
      </div>
    </div>

css

@import url('https://fonts.googleapis.com/css2?family=Single+Day&display=swap');

* {
  box-sizing: border-box;
}

body {
  background-color: #2b88f0;
  font-family: 'Single Day', cursive;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  height: 100vh;
  overflow: hidden;
  margin: 0;
}

h3 {
  color: #fff;
  margin: 10px 0 20px;
  font-size: 1.5em;
  font-weight: 400;
  text-align: center;
}

.container {
  width: 500px;
}

textarea {
  border: none;
  display: block;
  width: 100%;
  height: 100px;
  font-family: inherit;
  padding: 10px;
  margin: 0 0 20px;
  font-size: 16px;
}

textarea:focus {
  outline: none;
}

.tag {
  background-color: #f0932b;
  color: #fff;
  border-radius: 50px;
  padding: 10px 20px;
  margin: 0 5px 10px 0;
  font-size: 14px;
  display: inline-block;
}

.tag.highlight {
  background-color: #273c75;
}
profile
픽서

0개의 댓글