CSS pause Property
Last Updated :
07 Mar, 2024
The CSS pause property is used to define the pause time before and after the element. The pause property accepts two values pause-before and pause-after. If only one value is provided it applies to both properties.
Syntax:
pause: <'pause-before'> <'pause-after'>
Parameters: This property is the combination of two other property as mentioned above and described below:
- pause-before: This parameter holds the value for the pause-before property in numbers like 10ms.
- pause-after: This parameter holds the value for the pause-after property in numbers like 10ms.
Example 1: In this example, pause for 20 milliseconds, both before and after.
HTML
<!DOCTYPE html>
< html >
< head >
< style >
audio {
pause: 20ms;
}
</ style >
</ head >
< body style = "text-align: center;" >
< h1 style = "color: green;" >GeeksforGeeks</ h1 >
< p >CSS pause Property</ p >
< audio controls>
< source src =
type = "audio/mp3" >
</ audio >
</ body >
</ html >
|
Output:
Example 2: In this example, pause for 20 milliseconds before, and 10 milliseconds after.
HTML
<!DOCTYPE html>
< html >
< head >
< style >
audio {
pause: 20ms 10ms;
}
</ style >
</ head >
< body style = "text-align: center;" >
< h1 style = "color: green;" >GeeksforGeeks</ h1 >
< p >CSS pause Property</ p >
< audio controls>
< source src =
type = "audio/mp3" >
</ audio >
</ body >
</ html >
|
Output:
Supported Browsers: This property is deprecated in CSS3 so the major browsers are not supported by this property
Like Article
Suggest improvement
Share your thoughts in the comments
Please Login to comment...