<div class="wrapper">
<div class="control">
<div class="box width" contenteditable="true" dir="ltr">确认</div>
<div class="box width" contenteditable="true" dir="ltr">Done</div>
<div class="box width" contenteditable="true" dir="rtl">تم</div>
</div>
<div class="control">
<div class="box min-width" contenteditable="true" dir="ltr">确认</div>
<div class="box min-width" contenteditable="true" dir="ltr">Done</div>
<div class="box min-width" contenteditable="true" dir="rtl">تم</div>
</div>
</div>
*,
*::before,
*::after {
box-sizing: border-box;
}
html,
body {
min-height: 100vh;
font-family: 'Open sans', sans-serif;
}
body {
background: linear-gradient(50deg, #f3c680, hsla(179,54%,76%,1));
display: flex;
justify-content: center;
align-items: center;
padding: 3vh;
}
.wrapper {
position: relative;
width: 50vw;
background: white;
border-radius: 15px;
padding: 3vh;
box-shadow: 0 10px 40px rgba(0, 0, 0, 0.1);
display: flex;
flex-direction: column;
justify-content: center;
align-items: center;
min-height: 50vh;
}
.control {
margin: 2vh;
}
.box {
display: inline-flex;
justify-content: center;
align-items: center;
background: #755ac3;
padding: 0.35rem 1rem;
color: #fff;
border-radius: 4px;
text-align: center;
box-shadow: 0 3px 6px 0 rgba(0, 0, 0, 0.15);
font-size: 1.3rem;
text-shadow: 1px 1px 1px rgba(255,255,255,.25);
min-height: 40px;
}
.min-width {
min-width: 100px;
}
View Compiled
This Pen doesn't use any external CSS resources.
This Pen doesn't use any external JavaScript resources.