“CSS Max Lines” Respostas de código

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

restringir um parágrafo 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

restringir um parágrafo 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 número de linhas apenas

.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

Respostas semelhantes a “CSS Max Lines”

Perguntas semelhantes a “CSS Max Lines”

Mais respostas relacionadas para “CSS Max Lines” em CSS

Procure respostas de código populares por idioma

Procurar outros idiomas de código