<div class="container h-100">
<div class="father h-100">
<div class="child-1">
<span class="mr-auto">
<i class="far fa-folder"></i>
<span>測試資料夾</span>
</span>
<span>
<button class="mr-1" type="button">按鈕</button>
<button type="button">按鈕</button>
</span>
</div>
<div class="child-2">
<p>測試內容</p>
</div>
</div>
</div>
* {
font-family: "Noto Sans TC", 微軟正黑體;
box-sizing: border-box !important;
}
html, body, div, span, applet, object, iframe,
h1, h2, h3, h4, h5, h6, p, blockquote, pre,
a, abbr, acronym, address, big, cite, code,
del, dfn, em, img, ins, kbd, q, s, samp,
small, strike, strong, sub, sup, tt, var,
b, u, i, center,
dl, dt, dd, ol, ul, li,
fieldset, form, label, legend,
table, caption, tbody, tfoot, thead, tr, th, td,
article, aside, canvas, details, embed,
figure, figcaption, footer, header, hgroup,
menu, nav, output, ruby, section, summary,
time, mark, audio, video {
margin: 0;
padding: 0;
border: 0;
font-size: 100%;
font: inherit;
vertical-align: baseline;
}
/* HTML5 display-role reset for older browsers */
article, aside, details, figcaption, figure,
footer, header, hgroup, menu, nav, section {
display: block;
}
html,body {
height: 100%;
width: 100vw;
}
ol, ul {
list-style: none;
}
blockquote, q {
quotes: none;
}
blockquote:before, blockquote:after,
q:before, q:after {
content: '';
content: none;
}
table {
border-collapse: collapse;
border-spacing: 0;
}
button {
border-radius: 22px;
padding: 5px 10px;
border: 0px;
box-shadow: 0px 3px 6px 0px;
cursor: pointer;
}
.h-100 {
height: 100%;
}
.w-100 {
width: 100%;
}
.d-flex{
display: flex;
}
.ai-center {
align-items: center;
}
.mr-auto {
margin-right: auto;
}
.mr-1 {
margin-right: 16px;
}
.container {
padding: 10px;
}
.father {
box-sizing: border-box;
max-width: 900px;
border-radius: 9px;
display: flex;
flex-direction: column;
box-shadow: 0px 3px 6px 0 rgba(0, 0, 0, 0.3);
padding: 16px;
}
.child-1 {
display: flex;
align-items: center;
justify-content: space-between;
border: 2px solid black;
padding: 10px;
margin-bottom: 10px;
}
.child-2 {
flex-grow: 1;
padding: 10px;
border: 2px solid black;
}
This Pen doesn't use any external JavaScript resources.