분류
html
HTML로 할 수 있는 일 - 페이지 내용 편집
본문
https://codepen.io/ananyaneogi/pen/RzZQRL
HTML :
<h1>Editing page content</h1>
<div class="edit" contenteditable>
You can edit me...and add as much ye wish!
</div>
CSS :
body {
display: flex;
flex-direction: column;
justify-content: center;
align-items: center;
padding 40px;
}
h1 {
font-size: 3rem;
color: mediumaquamarine;
font-family: "Berkshire Swash", cursive;
text-align: center;
}
.edit {
width: 80%;
height: 100%;
min-height: 51vh;
outline: none;
color: #333;
font-family: "Berkshire Swash", cursive;
font-size: 1.2rem;
line-height: 1.56;
margin: 30px;
padding: 30px 50px;
position: relative;
border: 1px solid #DFE8EC;
background: -webkit-linear-gradient(top, #DFE8EC 0%, white 8%) 0 56px;
background: -moz-linear-gradient(top, #DFE8EC 0%, white 8%) 0 56px;
background: linear-gradient(top, #DFE8EC 0%, white 8%) 0 56px;
-webkit-background-size: 100% 30px;
-moz-background-size: 100% 30px;
background-size: 100% 30px;
}
.edit:before {
content: '';
position: absolute;
top: 0;
left: 30px;
width: 1px;
height: 100%;
border: 1px solid indianred;
opacity: 0.5;
}
- 이전글쉬운 복사 - 붙여 넣기 아름다운 CSS 원하는대로 쉽게 사용자 지정할 수 있습니다. 19.07.08
- 다음글HTML로 할 수 있는 일 - 텍스트 삭제 및 삽입 표시 19.07.07