XML technologies / CSS / Advanced websites with CSS / CSS property reference / play-during

(Excerpt from “CSS − Advanced websites with Cascading Stylesheets” by Rachel Andrew & Dan Shafer)

The property play-during describes a background sound in aural browsers, played while an element’s contents are read in the foreground.

Inherited: no

See also: cue

Values

The syntax of the property play-during is as follows. Values are separated by spaces:

play-during: url(uri) [mix] [repeat]

uri represents the absolute or relative URL of the sound file. The optional constant mix mixes the element’s background sound with its parent’s background sound. The optional constant repeat loops the background sound indefinitely.

Alternatively, the following constants can be used:

  • auto

  • none

auto keeps the parent element’s background sound playing while the current element is read. none suppresses the parent element’s background sound while the element is read.

Default value: auto

Compatibility

CSS version: 2

Not supported by any current visual browser.

Example

The following rule plays the file geigen.wav as background sound in div sections of the class liebesszene:

div.liebesszene {
 play-during: url(/sounds/geigen.wav) repeat;
}

  

 

 

 

back to top