“Soporte de navegador WebKit-Line-Swill” Código de respuesta

Soporte de navegador WebKit-Line-Swill

// Truncate text when it exceeds 3 lines of text using -webkit-line-clamp

p {
	overflow: hidden;
    display: -webkit-box;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 3 // change 3 with any number of lines you want to set
}
Yingfufu

CSS de sujeción

font-size: clamp(1rem, 2.5vw, 2rem);
font-size: clamp(1.5rem, 2.5vw, 4rem);
font-size: clamp(1rem, 10vw, 2rem);
Tommy

Webkit-line-shamp: 2;

.wrapper {
  padding: 20px;
  background: #eaeaea;
  max-width: 400px;
  margin: 50px auto;
}

.demo-1 {
  overflow: hidden;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
}

.demo-2 {
  overflow: hidden;
  white-space: nowrap;
  text-overflow: ellipsis;
  max-width: 150px;
}
Wicked Willet

Webkit-line-shamp: 2;

.wrapper {
  padding: 20px;
  background: #eaeaea;
  max-width: 400px;
  margin: 50px auto;
}

.demo-1 {
  overflow: hidden;
  display: -webkit-box;
  -webkit-line-clamp: 1;
  -webkit-box-orient: vertical;
}

.demo-2 {
  overflow: hidden;
  white-space: nowrap;
  text-overflow: ellipsis;
  max-width: 150px;
}
Wicked Willet

Respuestas similares a “Soporte de navegador WebKit-Line-Swill”

Preguntas similares a “Soporte de navegador WebKit-Line-Swill”

Explore las respuestas de código populares por idioma

Explorar otros lenguajes de código