-3

私は検索して、プロパティの動作でマーキーを行うために多くのことを試みます:jQueryを 使用しますが、すべてのブラウザと互換性のある結果が見つかりません..助けてください...古いマーキー

<marquee behavior=alternate>MY TEXT</marquee>

私が試したこと

<script>

しかし、結果はありません また、私は多くの結果でそれを検索します..それらを試してみますが、結果はありません..助けてください

4

2 に答える 2

0

こんにちは、使用できるプラグインがあります:

http://plugins.jquery.com/marquee/

使い方は簡単です - ここでデモをご覧ください: http://aamirafridi.com/jquery/jquery-marquee-plugin#examples

文字通り、プラグインが追加された後、$('.selector').marquee(); 左から右に移動するには:

var vDirection = 'left';
    setInterval(function(){
        $('.marquee2').marquee({ duration: 5000,
        gap: 50,
        delayBeforeStart: 0,
        direction: vDirection,
        duplicated: true
    });
    vDirection = vDirection == 'left' ? 'right' : 'left';
    },700);

タイミング (700) を任意に調整します。

于 2014-06-20T11:00:41.560 に答える
0

https://www.w3schools.com/css/css3_animations.aspから学んだこのコードを試して、この Web からさらにパラメーターを試してください。必要な Java コードはなく、css だけです。

.noteex {
color: orange;
font-weight: bold;
font-style: italic;
font-size: 150%;
position: relative;
animation-name: notemarq;
animation-duration: 4s;
animation-iteration-count: infinite;
animation-direction: alternate;
animation-timing-function: linear;
}

@keyframes notemarq {
0% {color: orange; left:0; top:0px;}
25%  {color: red;}
50%  {color: green;}
75%  {color: purple;}
100% {color: blue; left:60%; top:0px;}
}
<div class="noteex">Good Note</div>

于 2021-09-08T14:30:08.010 に答える