CSS play-during property

CSSWeb DevelopmentFront End Technology

This property specifies a sound to be played as a background while an element's content is spoken. Possible values could be any of the followings −

  • URI − The sound designated by this <uri> is played as a background while the element's content is spoken.
  • mix − When present, this keyword means that the sound inherited from the parent element's play-during property continues to play and the sound designated by the uri is mixed with it. If the mix is not specified, the element's background sound replaces the parent's.
  • repeat − When present, this keyword means that the sound will repeat if it is too short to fill the entire duration of the element. Otherwise, the sound plays once and then stops.
  • auto − The sound of the parent element continues to play.
  • none − This keyword means that there is silence.


You can try the following code to implement CSS play-during property −

      blockquote.sad { play-during: url("violins.aiff") }
      blockquote q { play-during: url("harp.wav") mix }
      span.quiet { play-during: none }
Updated on 27-Jun-2020 12:25:48