CSS Text Dengan Gradient
- Last modified atParagraf dengan menggunakan gradient berguna ketika panjang suatu konten tidak bisa terprediksi, tetapi box atau container memiliki tinggi yang tetap / fixed. Tujuan gradient membuat tampilan tetap terlihat elegan walaupun terdapat overflow.
<div class="content">
Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum.
<div class="fade"></div>
</div>
.content {
width: 250px;
height: 200px;
background: #ddd;
overflow: hidden;
}
.fade {
background: linear-gradient(rgba(255, 255, 255, 0) 0%, #fff 100%);
bottom: 175px;
height: 175px;
position: relative;
}
See the Pen Gradient Text by Kunto Aji. K (@kuntoaji) on CodePen.
Recent Posts
Broken Pipe Error
My note about Broken Pipe error
Shell Script First
In this blog post, I'll explain why I prioritize shell scripting as my primary solution for automating tasks, and only turn to full-fledged programming languages like Ruby and Python when necessary.
Lessons from Creating the Unsplash Image Resizer: Simplifying Image Downloads with HTML's Download Attribute
How I discovered the download attribute and used it to improve image downloads
C# - The Difference Between string[] and List
Learn the difference between string[] and List
in C# and when to use each for storing collections of strings in your code Output Redirection - Standard Input, Standard Output, Standard Error, /dev/null
Penjelasan singkat mengenai shell piping dan /dev/null