zoukankan      html  css  js  c++  java
  • 滚动字

    <!doctype html>
    <html lang="en">
    <head>
        <meta charset="UTF-8">
        <meta name="viewport" content="width=device-width, user-scalable=no, initial-scale=1.0, maximum-scale=1.0, minimum-scale=1.0">
        <meta http-equiv="X-UA-Compatible" content="ie=edge">
        <title>纯css实现文字循环滚动效果</title>
        <style type="text/css">
            * {
                margin: 0;
                padding: 0;
            }
     
            .box {
                width: 300px;
                margin: 0 auto;
                border: 1px solid #ff6700;
                overflow: hidden;
            }
     
            .animate {
                padding-left: 20px;
                font-size: 12px;
                color: #000;
                display: inline-block;
                white-space: nowrap;
                animation: 10s wordsLoop linear infinite normal;
            }
    
     
            @keyframes wordsLoop {
                0% {
                    transform: translateX(250px);
                    -webkit-transform: translateX(250px);
                }
                100% {
                    transform: translateX(-100%);
                    -webkit-transform: translateX(-100%);
                }
            }
     
            @-webkit-keyframes wordsLoop {
                0% {
                    transform: translateX(250px);
                    -webkit-transform: translateX(250px);
                }
                100% {
                    transform: translateX(-100%);
                    -webkit-transform: translateX(-100%);
                }
            }
        </style>
    </head>
    <body>
    <div class="box">
        <div class="animate">
            1文字滚动的内容文字滚动   2的内容文字滚动的内容文字滚动的内 3容文字滚动的内容文字滚动的内容文 4字滚动的内容文字滚动的内容文字滚动的内容
        </div>
    </div>
    </body>
    </html>

     2. element ui table表格中滚动字

    <el-table-column prop="line" align="center" label="航线" min-width="520">
        <template slot-scope="scope">
                 <div class="scrollText">
                    <div class="st-inner"
                       :class="{'st-scrolling': scope.row.line.length>50?true:false}">
                      <span class="st-section comment">{{scope.row.line}}</span>
                   </div>
               </div>
         </template>
    </el-table-column>


    /* 单元格内滚动字 */
    .scrollText {
    overflow: hidden;
    white-space: nowrap;
    /* 300px; */
    }

    .st-inner {
    display: inline-block;
    }

    .st-scrolling .st-section {
    padding: 0 5px;
    }

    /* // 向左匀速滚动动画 */
    .st-scrolling {
    animation: scroll 10s linear infinite;
    }

    @keyframes scroll {

    /* 0% {
    transform: translate3d(0%, 0, 0);
    }
    100% {
    transform: translate3d(-50%, 0, 0);
    } */
    0% {
    transform: translateX(300px);
    -webkit-transform: translateX(300px);
    }

    100% {
    transform: translateX(-100%);
    -webkit-transform: translateX(-100%);
    }
    }
     
  • 相关阅读:
    HDU 4315 Climbing the Hill [阶梯Nim]
    POJ 1704 Georgia and Bob [阶梯Nim]
    BZOJ 1874: [BeiJing2009 WinterCamp]取石子游戏 [Nim游戏 SG函数]
    BZOJ 1299: [LLH邀请赛]巧克力棒 [组合游戏]
    浏览器缓存知识点总结
    软件测试自动化的最新趋势
    性能测试面试题(附答案
    最流行的自动化测试工具,总有一款适合你
    49种软件测试方法
    linux执行jmeter脚本解决响应数据为空
  • 原文地址:https://www.cnblogs.com/xuwupiaomiao/p/15207521.html
Copyright © 2011-2022 走看看