“Dukungan browser klem webkit” Kode Jawaban

Dukungan browser klem webkit

// 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

klem CSS

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

Webkit-line-clamp: 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-clamp: 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

Jawaban yang mirip dengan “Dukungan browser klem webkit”

Pertanyaan yang mirip dengan “Dukungan browser klem webkit”

Jelajahi jawaban kode populer menurut bahasa

Jelajahi bahasa kode lainnya