Gradient Horizontal Rule


/ Published in: CSS
Save to your folder(s)

A subtle gradient effect for <hr> tags. Works on Firefox and Webkit browsers (i.e. Chrome / Safari / Midori).


Copy this code and paste it in your HTML
  1. hr {
  2. border: 0;
  3. height: 1px;
  4. background: -moz-linear-gradient(left center, transparent, black, transparent);
  5. background: -webkit-gradient(linear, left center, right center,
  6. color-stop(0, transparent),
  7. color-stop(0.5, black),
  8. color-stop(1, transparent));
  9. }

URL: http://jsbin.com/acomi4/2/

Report this snippet


Comments

RSS Icon Subscribe to comments

You need to login to post a comment.