css line code example

Example 1: css line-clamp

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

Example 2: html horizontal line style

<!-- HTML -->

<!-- You can change the style of the horizontal line like this: --> 

<hr style="width:50%", size="3", color=black>  


<!-- Or like this: -->

<hr style="height:2px; width:50%; border-width:0; color:red; background-color:red">

Example 3: line through in css

x {
  text-decoration: line-through;
}

Example 4: line-height css

/* Keyword value */
line-height: normal;

/* Unitless values: use this number multiplied
by the element's font size */
line-height: 3.5;

/* <length> values */
line-height: 3em;

/* <percentage> values */
line-height: 34%;

/* Global values */
line-height: inherit;
line-height: initial;
line-height: unset;

Example 5: dashed lin in css

hr {
  border:none;
  border-top:1px dashed #f00;
  color:#fff;
  background-color:#fff;
  height:1px;
  width:50%;
}

Tags:

Html Example