<!DOCTYPE html>
<html>
<head>
<meta charset="UTF-8">
<title>Flexbox Example</title>
<style>
html, body {
height: 100%;
margin: 0;
padding: 0;
overflow: hidden;
}
.parent {
height: 100%;
display: flex;
flex-direction: column;
}
.toolbar {
margin: 0;
padding: 0;
display: flex;
flex-wrap: wrap;
flex: none;
height: auto;
border-bottom: 1px solid #ccc;
}
.toolbar button {
border:0;
font-size: 24px;
padding: 10px;
font-family: webdings;
margin-right:5px;
background-color: transparent;
}
.toolbar button:hover {
background-color: #b0e2ff;
cursor:pointer;
}
.editor {
margin: 0;
overflow: auto;
border:0px;
padding: 10px;
flex: 1;
outline: none;
}
.editor:empty:before {
color: gray;
content: "请在这里编辑内容";
}
</style>
</head>
<body>
<div class="parent">
<div class="toolbar">
<button>1</button>
<button>2</button>
<button>3</button>
<button>4</button>
<button>5</button>
<button>6</button>
<button>7</button>
<button>8</button>
<button>9</button>
<button>A</button>
<button>B</button>
<button>C</button>
<button>D</button>
<button>E</button>
<button>F</button>
<button>G</button>
<button>H</button>
<button>I</button>
<button>J</button>
<button>K</button>
<button>L</button>
<button>M</button>
<button>N</button>
<button>O</button>
<button>P</button>
<button>Q</button>
<button>R</button>
<button>S</button>
<button>T</button>
<button>U</button>
<button>V</button>
<button>W</button>
<button>X</button>
<button>Y</button>
<button>Z</button>
</div>
<div class="editor" contenteditable>
This is editor.
</div>
</div>
</body>
</html>