<div class="container">
<div class="box">
<span>所谓的自由,实际上在于你能意识到什么,而不在于你享有什么。对于一个文化水平不高的农民来说,尽管每年的农务受到二十四节气的限制,但他不会感觉到有什么不自由。农闲的时候和亲朋打打牌,农忙的时候忙完一天的农活儿,晚上回家喝点儿小酒,感觉惬意且满足,仿佛自己所做的都是自己想做的。可是文化水平越高,思维和意识越复杂,人就越难在工作中感觉到自由。</span>
<span class="transparent_gradient"></span>
</div>
</div>
body {
margin: 0;
height: 100vh;
}
.container {
display: flex;
align-items: center;
justify-content: center;
height: 100%;
}
.box {
font-size: 20px;
position: relative;
font-family: sans-serif;
font-weight: bold;
width: 50%;
color: gainsboro;
background: black;
padding: 20px;
border-radius: 20px;
}
.transparent_gradient {
display: block;
position: absolute;
bottom: 0;
left: 0;
width: 100%;
height: 15.0208333333vw;
border-radius: 20px;
background: linear-gradient(180deg, transparent 0, black 100%);
}
@media screen and (max-width: 680px) {
.box {
font-size: 12px;
}
}
This Pen doesn't use any external CSS resources.
This Pen doesn't use any external JavaScript resources.