just li menu item and a

by igorbeuermann

HTML

<ul>
	<li id="led-li">
		<a class="gradient" target="_blank" rel="noopener noreferrer" href="">Product 1</a>
	</li>
	<li id="fci-li">
		<a class="gradient" target="_blank" rel="noopener noreferrer" href="">Product 2</a>
	</li>
	<li id="fcn-li">
		<a class="gradient" target="_blank" rel="noopener noreferrer" href="">Product 3</a>
	</li>
</ul>

CSS

:root {
    --menu-item-width: 50%; 
}

ul li {
    display: block;
    position: relative;
    list-style: none;
    color: #000;
    margin: 0;
    height: 2em;
    width: var(--menu-item-width);
    border-top: 1px dotted #969696;
}

li:last-child {
    border-bottom: 1px dotted #969696;
}


a {
    position: relative;
    text-decoration: none;
    color: #000;
    top: 0;
    display: block;
    width: 100%;
    height: calc(100% - 5px);
    padding: 5px 0 0 0;
    text-align: center;
    text-transform: uppercase;
    font-weight: 400;
    font-family: Akrobat, Graphik, Arial, sans-serif;
}

.gradient {
  position: relative;
  background: linear-gradient(90deg, #007934 0%, white 0%);
  z-index: 1;
  overflow: hidden;
}

.gradient::before {
  position: absolute;
  content: "";
  top: 0;
  right: 0;
  bottom: 0;
  background: linear-gradient(90deg, #007934 0%, white 100%);
  z-index: -1;
  transition: /* opacity, */ left 0.5s ease-in-out;
  left: -100%;
  width: 100%;
}

.gradient:hover::before {
  left: 0%;
}