css 多行文本以...代替

DOCTYPE html>
<html>
    <head>
        <meta charset="UTF-8">
        <title>title>
    head>
    <style type="text/css">
        p {
            width: 200px;
            overflow : hidden;
            text-overflow: ellipsis;
            display: -webkit-box;
            -webkit-line-clamp: 2;
            -webkit-box-orient: vertical;
        }
    style>
    <body>
        <p>上单发送的发是大法师打发斯蒂芬阿斯顿发asdfasdf发手动阀asdfasdf发送地方阿斯顿发asdfasdf发多少飞asdfasdf发送地方发斯蒂芬p>
    body>
html>

 

转载于:https://www.cnblogs.com/zouqin/p/6424012.html

你可能感兴趣的:(css 多行文本以...代替)