Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save kannankumar/ce43e3555e009992c2adc5dcfd46c4f6 to your computer and use it in GitHub Desktop.
Save kannankumar/ce43e3555e009992c2adc5dcfd46c4f6 to your computer and use it in GitHub Desktop.
Faded Horizontal Line using CSS Gradients
<br><br><br>
<div class="fade_rule"></div>
<br><br><br>
<div class="fade_rule"></div>
<br><br><br>
<div class="fade_rule"></div>
.fade_rule {
height: 1px;
background-color: #E6E6E6;
width: 66.0em;
margin: 0 auto;
background-image: linear-gradient(left , white 2%, #E6E6E6 50%, white 98%);
background-image: -o-linear-gradient(left , white 2%, #E6E6E6 50%, white 98%);
background-image: -moz-linear-gradient(left , white 2%, #E6E6E6 50%, white 98%);
background-image: -webkit-linear-gradient(left , white 2%, #E6E6E6 50%, white 98%);
background-image: -ms-linear-gradient(left , white 2%, #E6E6E6 50%, white 98%);
background-image: -webkit-gradient( linear, left bottom, right bottom, color-stop(0.02, white), color-stop(0.5, gray), color-stop(0.98, white) );
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment