![]() Var articleheight = $('article'). Var lineheight = parseFloat($('p').css('line-height')) What the strag will think is that any man who can hitch the length and breadth of the galaxy, rough it, slum it, struggle against terrible odds, win through, and still knows where his towel is is clearly a man to be reckoned with. Furthermore, the strag will then happily lend the hitch hiker any of these or a dozen other items that the hitch hiker might accidentally have "lost". For some reason, if a strag (strag: non-hitch hiker) discovers that a hitch hiker has his towel with him, he will automatically assume that he is also in possession of a toothbrush, face flannel, soap, tin of biscuits, flask, compass, map, ball of string, gnat spray, wet weather gear, space suit etc., etc. More importantly, a towel has immense psychological value. Partly it has great practical value - you can wrap it around you for warmth as you bound across the cold moons of Jaglan Beta you can lie on it on the brilliant marble-sanded beaches of Santraginus V, inhaling the heady sea vapours you can sleep under it beneath the stars which shine so redly on the desert world of Kakrafoon use it to sail a mini raft down the slow heavy river Moth wet it for use in hand-to-hand-combat wrap it round your head to ward off noxious fumes or to avoid the gaze of the Ravenous Bugblatter Beast of Traal (a mindboggingly stupid animal, it assumes that if you can't see it, it can't see you - daft as a bush, but very ravenous) you can wave your towel in emergencies as a distress signal, and of course dry yourself off with it if it still seems to be clean enough. A towel, it says, is about the most massivelyuseful thing an interstellar hitch hiker can have. } The Hitch Hiker's Guide to the Galaxy has a few things to say on the subject of towels. I have this JSFiddle to illustrate the issue. Maecenas scelerisque sodales ipsum a hendrerit. In massa ipsum, bibendum quis lorem et, volutpat ultricies nisi. Mauris vestibulum, eros ac ultrices lacinia, justo est faucibus ipsum, sed sollicitudin sapien odio sed est. Quisque bibendum sem at bibendum suscipit. When applied to anchor elements, the truncating can happen in the middle of the text, not necessarily at the end. Nunc sollicitudin lorem eget eros eleifend facilisis. In most cases you will also want to set overflow to hidden, otherwise the contents won't be clipped but an ellipsis will still be shown after the specified number of lines. Suspendisse fermentum suscipit eros, ac ultricies leo sagittis quis. Maecenas vitae quam ac mi venenatis vulputate. Proin arcu diam, tempus ac vehicula a, dictum quis nibh. Aliquam dignissim velit sed nunc imperdiet cursus. It need to be dynamic and change with resizing, div width is not constant and known. In this example, first row with dots must be red because it hide text with red color, and show black dots on second row, because there is no red text hidden by dots. Vivamus vitae pharetra nisl, eget fringilla elit. How to style dots (ellipsis) depend on what text it hide. Maecenas scelerisque sodales ipsum a hendreritLorem ipsum dolor sit amet, consectetur adipiscing elit. ![]() Nunc sollicitudin lorem eget eros eleifend facilisis. ![]() Vivamus vitae pharetra nisl, eget fringilla elit. I made alot of search for this and I couldn't find any simple and pure Javascript solution.} Lorem ipsum dolor sit amet, consectetur adipiscing elit.
0 Comments
Leave a Reply. |