If you need X-Browser support (not only for Opera and Webkit, for example @ c69).
I found a more fancy way. But also for manual tuning.
take a look at the working jsfiddle example.
HTML
<p> Lorem ipsum dolor sit amet, consectetur </p>
CSS
p { height: 3.7em; position: relative; overflow: hidden; width: 235px; } p:after{ background: linear-gradient(to right, rgba(255,255,255,0) 0%,rgba(255,2055,255,1) 30%); filter: progid:DXImageTransform.Microsoft.gradient( startColorstr='#00ffffff', endColorstr='#ffffff',GradientType=1 ); bottom: 0; content: "..."; float:right; padding-left: 10px; position: absolute; right: 0; }
A source:
1 mobify
2 css tricks
source share