css作文字限制

如何僅經過CSS實現多行文本超長自動省略號

.ellipsis:after {html

    content: "\02026";web

    box-sizing: content-box;spa

    -webkit-box-sizing: content-box;htm

    -moz-box-sizing: content-box;ip

    float: right; position: relative;get

    top: -22px; left: 100%;it

    width: 3em; margin-left: -3em;io

    padding-right: 5px;webkit

    text-indent: 24px;float

    background: -webkit-gradient(linear, left top, right top, from(rgba(255, 255, 255, 0)), to(white), color-stop(50%, white));

    background: -moz-linear-gradient(to right, rgba(255, 255, 255, 0), white 50%, white);

    background: -o-linear-gradient(to right, rgba(255, 255, 255, 0), white 50%, white);

    background: -ms-linear-gradient(to right, rgba(255, 255, 255, 0), white 50%, white);

    background: linear-gradient(to right, rgba(255, 255, 255, 0), white 50%, white); }

相關文章
相關標籤/搜索