CSS/MP3 question
- Started
- Last post
- 3 Responses
- datahiccup
Which CSS syntax would i use in order to have an mp3 start playing as soon as a user opens a splash page?
Thanks!
m
- dc_again0
css?!?! whoa, you're getting your technologies all mixed up there my friend. css is a language used to add style and layout to web pages - positioning elements, seeting colors, choosing fonts, etc, etc, etc. it's not for adding any functionality to a page. it's not like javascript or actionscript, or server side languages such as php, asp and cold fusion.
to play music on your site - why? - you're talking about enbedding media. you could do this using flash, or do a google for the html tags 'EMBED' and 'OBJECT'.
- fusionpixel0
CSS2 - The :before Pseudo-element
The ":before" pseudo-element can be used to insert some content before an element.
The style below will play a sound before each occurrence of a header one element.
h1:before
{
content: url(beep.wav)
}CSS2 - The :after Pseudo-element
The ":after" pseudo-element can be used to insert some content after an element.
The style below will play a sound after each occurrence of a header one element.
h1:after
{
content: url(beep.wav)
}
- instantok0
you certainly can use css to implement audio on your website:
http://www.w3.org/TR/REC-CSS2/au…
compatibility is a concern as always