<div class=”positionXmas”>
<div class=”lamp_1″>
<div class=”light_1″></div>
<div class=”poll_1″></div>
<div class=”bulb_1″>
<div class=”color_1″></div>
</div>
<div class=”shine_1″></div>
<div class=”shadow_1″></div>
</div>
</div>
Nu sætter vi CSS til at være centreret for vores design og designer snoren/stangen til Julekuglen.
.positionXmas {
margin-left: 50%;
margin-top: 0px;
}
.poll_1 {
position: absolute;
margin-left: 20px;
height: 200px;
width: 10px;
border-radius: 50px;
background-image: linear-gradient(to right, white, grey, black);
box-shadow: -5px 0 15px grey;
}
.light_1 {
position: absolute;
margin-top: 150px;
margin-left: -140px;
height: 300px;
width: 300px;
border-radius: 50%;
background-image: radial-gradient(magenta, violet, #510180);
filter: blur(30px);
/*animation: grow_2 10s infinite linear;*/
opacity: 0;
}
Så lang så godt. Nu skal vi til at lave CSS koden for farven der skinner frem
.color_1 {
position: absolute;
margin-top: 200px;
margin-left: 0px;
height: 260px;
width: 260px;
border-radius: 50%;
background-image: radial-gradient(#510180, magenta);
/*animation: grow_1 10s infinite linear;*/
opacity: 0;
}
.shine_1 {
position: absolute;
margin-top: 305px;
margin-left: -25px;
height: 80px;
width: 80px;
border-radius: 50%;
filter: blur(20px);
background-color: white;
opacity: 0.7;
}
.shadow_1 {
position: absolute;
margin-top: 190px;
margin-left: -105px;
height: 255px;
width: 255px;
border-radius: 50%;
box-shadow:
20px -20px 30px #320042 inset,
10px -10px 20px black inset,
-10px 10px 20px white inset;
}
https:// ajax. googleapis. com/ajax/libs/jquery/3.5.1/jquery.min. js
.button_On {
position: absolute;
margin-left: 80%;
margin-top: 30px;
width: 150px;
height: 50px;
border-radius: 50px;
background-color: purple;
color: white;
font-size: 18px;
box-shadow: -5px -10px 20px 7px black inset;
cursor: pointer;
}
.button_Off {
position: absolute;
margin-left: 80%;
margin-top: 100px;
width: 150px;
height: 50px;
border-radius: 50px;
background-color: purple;
color: white;
font-size: 18px;
box-shadow: -5px -10px 20px 7px black inset;
cursor: pointer;
}
.pause_1 {
position: absolute;
margin-left: 80%;
margin-top: 170px;
width: 150px;
height: 50px;
border-radius: 50px;
background-color: purple;
color: white;
font-size: 18px;
box-shadow: -5px -10px 20px 7px black inset;
cursor: pointer;
}