
- CSS Tutorial
- CSS - Home
- CSS - Introduction
- CSS - Syntax
- CSS - Inclusion
- CSS - Measurement Units
- CSS - Colors
- CSS - Backgrounds
- CSS - Fonts
- CSS - Text
- CSS - Images
- CSS - Links
- CSS - Tables
- CSS - Borders
- CSS - Margins
- CSS - Lists
- CSS - Padding
- CSS - Cursors
- CSS - Outlines
- CSS - Dimension
- CSS - Scrollbars
- CSS Advanced
- CSS - Visibility
- CSS - Positioning
- CSS - Layers
- CSS - Pseudo Classes
- CSS - Pseudo Elements
- CSS - @ Rules
- CSS - Text Effects
- CSS - Media Types
- CSS - Paged Media
- CSS - Aural Media
- CSS - Printing
- CSS - Layouts
- CSS - Validations
- CSS3 Tutorial
- CSS3 - Tutorial
- CSS3 - Rounded Corner
- CSS3 - Border Images
- CSS3 - Multi Background
- CSS3 - Color
- CSS3 - Gradients
- CSS3 - Shadow
- CSS3 - Text
- CSS3 - Web font
- CSS3 - 2d transform
- CSS3 - 3d transform
- CSS3 - Animation
- CSS3 - Multi columns
- CSS3 - User Interface
- CSS3 - Box Sizing
- CSS Responsive
- CSS - Responsive Web Design
- CSS References
- CSS - Questions and Answers
- CSS - Quick Guide
- CSS - References
- CSS - Color References
- CSS - Web browser References
- CSS - Web safe fonts
- CSS - Units
- CSS - Animation
- CSS Resources
- CSS - Useful Resources
- CSS - Discussion
- Selected Reading
- UPSC IAS Exams Notes
- Developer's Best Practices
- Questions and Answers
- Effective Resume Writing
- HR Interview Questions
- Computer Glossary
- Who is Who
CSS - play-during
Description
The play-during property defines a sound to be played while rendering the element's content. This sound is also known as a "background sound."
Possible Values
uri − A single URI may be given, and it should resolve to a sound file. If it does not, then play-during is treated as though it had been set to auto.
mix − Causes the background sound of the element to be played, along with any background sound resulting from the value of play-during for any ancestor elements.
repeat − Causes the background sound to be repeated if it finishes before the element is fully rendered. If the value does not contain repeat, then the sound will only be played once.
auto − Any sound being played for any ancestor elements will continue to be heard, but no background sound will be produced by the current element.
none − Causes complete background silence during the rendering of the element. No background sound is played for the element, and any background sounds associated with ancestor elements are also muted.
DOM Syntax
object.style.playDuring = "mix";
Applies to
All the HTML elements
Example
Here is the example −
<style type = "text/css"> <!-- h1 {play-during: url(ocean-waves.wav) mix repeat;} a:link {play-during: none;} --> </style>