Pull to refresh

[Заметка] Кроссбраузерный text-overflow в 7 строках

Reading time2 min
Views2.3K
style.css

.habr span
{
    display:block;
    overflow:hidden;
    white-space:nowrap;
    width:100%;
    -moz-binding:url("ellipsisxul.xml#ellipsis");
    text-overflow:ellipsis;
    -o-text-overflow:ellipsis;
}


ellipsisxul.xml

<?xml version="1.0"?>
<bindings xmlns="www.mozilla.org/xbl" xmlns:xbl="www.mozilla.org/xbl" xmlns:xul="www.mozilla.org/keymaster/gatekeeper/there.is.only.xul">
    <binding id="ellipsis">
        <content>
            <xul:window>
                <xul:description crop="end" xbl:inherits="value=xbl:text">
                    <children/>
                </xul:description>
            </xul:window>
        </content>
 
    </binding>
</bindings>


Пример: x3k.ru/habr/overflow
Код взят с new.music.yahoo.com/videos/charts
Tags:
Hubs:
+30
Comments24

Articles

Change theme settings