Հեղինակ
Վիդեոկուրսեր
Առաջարկել
Խորհուրդ եմ տալիս
Կոդ
<!doctype html> <html> <head> <meta charset="utf-8"> <title>Էջի վերնագիր</title> <style> #div1 { white-space: nowrap; width: 12em; overflow: hidden; text-overflow: clip; border: 1px solid #000000; } #div2 { white-space: nowrap; width: 12em; overflow: hidden; text-overflow: ellipsis; border: 1px solid #000000; } </style> </head> <body> <p>The following two divs contains a long text that will not fit in the box. As you can see, the text is clipped.</p> <p>This div uses "text-overflow:clip":</p> <div id="div1">This is some long text that will not fit in the box</div> <p>This div uses "text-overflow:ellipsis":</p> <div id="div2">This is some long text that will not fit in the box</div> </body> </html>
Արդյունք