Coder Wrap provides free to use snippets Coder Wrap provides free to use snippets

Back to HTML
Preview Source Code
Download
HTML
CSS
/**Typeo CSS Start**/
@import url('https://fonts.googleapis.com/css2?family=Poppins:ital,wght@0,400;0,500;0,600;0,700;1,400&display=swap');
*{ box-sizing: border-box;}
.cont-info {
    max-width: 400px;
    background-color: #000;
    color: #fff;
    padding: 15px;
    margin: auto;
    font-size: 16px; 
    font-family:"Poppins"
}
.cont-info p {
    font-size: 16px;
    line-height: 1.4;
}
.cont-info h3 {
    font-size: 22px;
    margin:0 0 10px 0px;
}
/**Typeo CSS Start**/
JS
$(document).ready(function(e) {
  $('.cont-info p').each(function(i) {
	var $this = $(this)
	var len = $this.text().length;
	if(len>200){
	  $(this).html($this.text().substr(0,200)+'...');
	}
  });
});

Related Snippets

Leave a comment

Your email address will not be published. Required fields are marked *