Search
 
SCRIPT & CODE EXAMPLE
 

CSS

webkit-line-clamp browser support

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

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;
}
Comment

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;
}
Comment

PREVIOUS NEXT
Code Example
Css :: vertical and horizontal align center div 
Css :: make hr black 
Css :: scss responsive container 
Css :: select two stuffes css 
Css :: multiple box shadows css 
Css :: select odd child css 
Css :: @fontface otf 
Css :: install wrangler 
Css :: border-color not working 
Css :: react bootstrap carousel not working 
Css :: how to make a dotted hr in css 
Css :: lynx install bash 
Css :: font weight 
Css :: how to insert gradient in css 
Css :: animate progress tag css 
Css :: create shadow css 
Css :: closing modal on iframe movies still running 
Css :: button transparent using css 
Css :: vuetify width of textfield 
Css :: scss select all childs 
Css :: button click css style 
Css :: remove materialize style input 
Css :: display elements in column css 
Css :: calc css float to procent 
Css :: sass variable 
Css :: backdrop filter css 
Css :: how to put a circle in input 
Css :: transition behaviour in css 
Css :: css focus 
Css :: jQuery ripple effects 
ADD CONTENT
Topic
Content
Source link
Name
4+1 =