Is there anyway to hide mp3 player? | Sololearn: Learn to code for FREE!

+6

Is there anyway to hide mp3 player?

sometimes you need a slow background music for a website that add extra beauty to the website. how can we do that?

6/24/2017 12:44:04 AM

Sabaoon Ullah

3 Answers

New Answer

+9

You can, using 'display:none;' 'visibility:hidden;' or even 'opacity:0;' (first one do not reserv the place needed by element, while both others set element transparent, keeping the space used by the block), but you will not be able to autoplay audio in mobile device, as this require user action for start downloading music/video (to prevent unnecessary mobile date consumption ^^)

+3

Or, with CSS, just set the "display" attribute to none.

+1

Give it in an ID in HTML and try in JavaSdript: document.getElemenyById("YourIdHere")style.display = 'none' or you can try using style = display:none as an attribute in HTML directly