html - Transparent border to hidden background with CSS -


i've thrown jsfiddle try show i'm thinking, i'd have hidden background under whole site , have links display background through transparent border when hovered over. can't figure out how hide background , still able show in border during hover.

here's i've got far.

body {    background-image: url("http://img05.deviantart.net/7fa2/i/2015/185/2/1/neon_rainbow_stripes_by_wolfy9r9r-d8zv7ba.png");    background-repeat: repeat;  }  ul {    list-style-type: none;    margin: 0;    padding: 0;    overflow: hidden;  }  li {    float: left;  }  li {    display: block;    color: #666;    text-align: center;    padding: 14px 16px;    text-decoration: none;  }  li a:hover {    color: #222;    border-bottom: 1px solid transparent;  }  .overlay {    position: fixed;    width: 100%;    height: 100%;    left: 0;    top: 0;    background: #fff;    z-index: 10;  }  .content {    position: relative;    z-index: 15;  }
<div class='overlay'></div>  <div class='content'>    <ul>      <li><a>nav 1</a>      </li>      <li><a>nav 2</a>      </li>      <li><a>nav 3</a>      </li>      <li><a>nav 4</a>      </li>    </ul>  </div>

any ideas?

something this?

fiddle

li a:hover {   color: #222;   border-bottom: 1px solid transparent;    /* added styles */   background-image: linear-gradient(white, white), url("http://img05.deviantart.net/7fa2/i/2015/185/2/1/neon_rainbow_stripes_by_wolfy9r9r-d8zv7ba.png");   background-clip: content-box, padding-box;   background-attachment: fixed; } 

or want show image border-bottom?

working fiddle


Comments

Popular posts from this blog

javascript - Thinglink image not visible until browser resize -

firebird - Error "invalid transaction handle (expecting explicit transaction start)" executing script from Delphi -

mongodb - How to keep track of users making Stripe Payments -