Create a Custom Audio Player

 




HTML code:-


<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <link rel="stylesheet" href="player.css">
    <title>Document</title>
</head>
<body>
    <div class="player">
        <div class="img">
            <img src="Background.jpg" alt="">
        </div>
        <audio controls>
            <source src="music.mp3" type="audio/mp3 ">
        </audio>
    </div>
</body>
</html>


CSS code:-

*{

    margin0;
    padding0;
    box-sizingborder-box;

}

body{

    displayflex;
    justify-contentcenter;
    align-itemscenter;
    height100vh;
    background-imageurl(Background.jpg);
    background-sizecover;
    background-positioncenter;

}

.player{

    positionrelative;
    width300px;
    height455px;
    backgroundrgba(2552552550.15);
    box-shadow20px 0 50px 80px rgba(redgreenblue0.377);
    border-radius10% 10% 5% 5%;

}
.player .img{

    positionrelative;
    width100%;
    height400px;

}

.player .img img{

    positionabsolute;
    top0;
    left0;
    width100%;
    height100%;
    object-fitcover;
    border-radius10% 10% 0 0;

}



channel link :- https://www.youtube.com/channel/UC1DFWpD1k1PtxIzYbdBAj6g 

Add your comment 

Signature :- Ayoub Shindi (Dev AAS).

Comments