“CSS Max Lines” Kode Jawaban

CSS Max Lines

.text {
   overflow: hidden;
   text-overflow: ellipsis;
   display: -webkit-box;
   -webkit-line-clamp: 2; /* number of lines to show */
   -webkit-box-orient: vertical;
}
Lucky Lyrebird

Batasi Paragraf Tinggi CSS

body {
   margin: 20px;
}

.text {
   overflow: hidden;
   text-overflow: ellipsis;
   display: -webkit-box;
   -webkit-line-clamp: 2; /* number of lines to show */
   -webkit-box-orient: vertical;
}
Wide-eyed Worm

Batasi Paragraf Tinggi CSS

.class{
   word-break: break-word;
   overflow: hidden;
   text-overflow: ellipsis;
   display: -webkit-box;
   line-height: 16px; /* fallback */
   max-height: 32px; /* fallback */
   -webkit-line-clamp: 2; /* number of lines to show */
   -webkit-box-orient: vertical;
}
Wide-eyed Worm

CSS N Jumlah Baris saja

.className{
  overflow: hidden;
  text-overflow: ellipsis;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;

   line-height: 16px; /* Height taken by one line */
   max-height: 32px; /* (line-height * numberOfLineYouWant) In this case we want 2 lines so we will multiply lineHeight by 2 so 16 * 2 = 32 => 32px */
						/* Remember if you have more height then it'll render new line so match height of container with => lineHeight * numberOfLines */
}
Duck Duck Go-ogle

Jawaban yang mirip dengan “CSS Max Lines”

Pertanyaan yang mirip dengan “CSS Max Lines”

Lebih banyak jawaban terkait untuk “CSS Max Lines” di CSS

Jelajahi jawaban kode populer menurut bahasa

Jelajahi bahasa kode lainnya