This page is Ready to Use

Notice: The WebPlatform project, supported by various stewards between 2012 and 2015, has been discontinued. This site is now available on github.

marquee-play-count

Summary

This property specifies how many times the marquee content moves.

Overview table

Initial value
1
Applies to
non-replaced block-level elements and non-replaced ’inline-block’ elements
Inherited
Yes
Media
visual
Computed value
as specified
Animatable
No
CSS Object Model Property
marqueePlayCount
Percentages
n/a

Syntax

  • marquee-play-count: <non-negative-integer>
  • marquee-play-count: infinite

Values

<non-negative-integer>
Any value of 0 and higher. If the value is greater than 16, the UA may stop after 16 loops.
infinite
An infinite loop. The UA may stop after 16 loops.

Examples

h1 {
    overflow: auto;
    overflow-style: marquee-line;
    white-space: nowrap;
    width: 200px;
    marquee-play-count: 2;
}

View live example

Usage

 If marquee-play-count changes because of a state change (e.g. on hover), the loop counter will reset of the computed value differs:

For example:

 h1 { marquee-play-count: 2; }
 h1:hover { marquee-play-count: 4;}

Now, the h1 loops 2 times, until you hover over it. Then the loop counter will reset and it loops for 4 times. If you than leave the element, it resets again and it will loop 2 times.

Related specifications

CSS Marquee Module Level 3
Candidate Recommendation