<p><a href="/a/">Lorem ipsum dolor sit amet, consectetur adipiscing elit. Sed massa neque, commodo vitae elementum nec, rutrum sed lorem. Vivamus sit amet libero ipsum, at semper tortor.</a></p>
<p><a href="/a/" class="dashed">Lorem ipsum dolor sit amet, consectetur adipiscing elit. Sed massa neque, commodo vitae elementum nec, rutrum sed lorem. Vivamus sit amet libero ipsum, at semper tortor.</a></p>
<p><a href="/a/" class="dotted">Lorem ipsum dolor sit amet, consectetur adipiscing elit. Sed massa neque, commodo vitae elementum nec, rutrum sed lorem. Vivamus sit amet libero ipsum, at semper tortor.</a></p>
CSS
p {
margin: 10px;
}
a {
text-decoration: none;
background: -moz-linear-gradient(left, red, red 100%);
background: -ms-linear-gradient(left, red, red 100%);
background: -o-linear-gradient(left, red, red 100%);
background: -webkit-gradient(linear, 0 0, 100% 0, from(red), to(red));
background: -webkit-linear-gradient(left, red, red 100%);
background: linear-gradient(left, red, red 100%);
background-position: 0 100%;
background-size: 10px 1px;
background-repeat: repeat-x;
}
.dashed {
background: -moz-linear-gradient(left, red, red 60%, transparent 60%);
background: -ms-linear-gradient(left, red, red 60%, transparent 60%);
background: -o-linear-gradient(left, red, red 60%, transparent 60%);
background: -webkit-gradient(linear, 0 0, 100% 0, from(red), color-stop(0.6, red), color-stop(0.6, transparent));
background: -webkit-linear-gradient(left, red, red 60%, transparent 60%);
background: linear-gradient(left, red, red 60%, transparent 60%);
background-size: 10px 1px;
background-repeat: repeat-x;
background-position: 0 100%;
}
.dotted {
background: -moz-linear-gradient(left, red, red 50%, transparent 50%);
background: -ms-linear-gradient(left, red, red 50%, transparent 50%);
background: -o-linear-gradient(left, red, red 50%, transparent 50%);
background: -webkit-gradient(linear, 0 0, 100% 0, from(red), color-stop(0.5, red), color-stop(0.5, transparent));
background: -webkit-linear-gradient(left, red, red 50%, transparent 50%);
background: linear-gradient(left, red, red 50%, transparent 50%);
background-size: 2px 1px;
background-repeat: repeat-x;
background-position: 0 100%;
}
Please Whitelist JSFiddle in your content blocker.
Help keep JSFiddle free for always by one of two ways:
Whitelist JSFiddle in your content blocker (two clicks)
Go PRO and get access to additional PRO features →
Join the 4+ million users, and keep the JSFiddle dream alive.
Ad-free
All ads in the editor and listing pages are turned completely off.
Use pre-released features
You get to try and use features (like the Palette Color Generator) months before everyone else.
Fiddle collections
Sort and categorize your Fiddles into multiple collections.
Private collections and fiddles
You can make as many Private Fiddles, and Private Collections as you wish!
Console
Debug your Fiddle with a minimal built-in JavaScript console.