<!DOCTYPE html>
<!-- The YOURCODE -->
<html lang="en" dir="ltr">
<head>
<meta charset="utf-8">
<title>Glowing Bulb Effect | YOURCODE </title>
<style>
@import url('https://fonts.googleapis.com/css?family=Poppins:400,500,600,700&display=swap');
/* THis Source COde Downloaded From TheYourCode
"http://theyourcode.blogspot.com/"
*/
* {
margin: 0;
padding: 0;
box-sizing: border-box;
font-family: 'Poppins', sans-serif;
}
body {
display: flex;
align-items: center;
justify-content: center;
min-height: 100vh;
background: #111;
}
/* THis Source COde Downloaded From TheYourCode
"http://theyourcode.blogspot.com/"
*/
.wrapper {
width: 450px;
height: 500px;
position: relative;
}
img {
margin-top: -50px;
height: 450px;
width: 100%;
position: absolute;
}
/* THis Source COde Downloaded From TheYourCode
"http://theyourcode.blogspot.com/"
*/
img#bulb-on {
opacity: 0;
animation: glow 3s linear infinite;
transition: all 1s ease;
}
@keyframes glow {
0% {
opacity: 1;
}
5% {
opacity: 1;
}
70% {
opacity: 1;
}
74% {
opacity: 0;
}
80% {
opacity: 1;
}
84% {
opacity: 0;
}
90% {
opacity: 1;
}
100% {
opacity: 1;
}
}
.btn {
position: absolute;
bottom: 0;
left: 50%;
transform: translateX(-50%);
}
/* THis Source COde Downloaded From TheYourCode
"http://theyourcode.blogspot.com/"
*/
.btn span {
height: 50px;
width: 180px;
display: block;
text-align: center;
line-height: 48px;
background: none;
color: #fff;
text-transform: uppercase;
font-size: 20px;
cursor: pointer;
border: 2px solid #fff;
border-radius: 5px;
transition: all 1s ease;
}
.btn span:hover {
background: #fff;
color: #111;
}
#btn:checked~.btn span {
background: #111;
color: #fff;
}
.btn span:before {
content: "Turn Off";
}
#btn:checked~img#bulb-on {
animation: none;
}
#btn:checked~.btn span:hover {
background-color: #fff;
color: #111;
}
#btn:checked~.btn span:before {
content: "Turn on";
}
.wrapper input {
display: none;
}
/* THis Source COde Downloaded From TheYourCode
"http://theyourcode.blogspot.com/"
*/
</style>
</head>
<body>
<!-- THis Source COde Downloaded From TheYourCode
"http://theyourcode.blogspot.com/" -->
<!-- Header Starts-->
<!--Remove header To Remove Our extra Sentences-->
<header>
<div>
<h1 style="color: white; vertical-align: top ">
Glowing Bulb Effect using only HTML & CSS { With Source Codes}
</h1>
<br>
<h2 style="margin-left: 50%; color: white; vertical-align: top; padding: 0;">
-TheYourCode
</h2>
</div>
</header>
<!-- Header Ends-->
<!-- Blub Area Starts -->
<div class="wrapper">
<input type="checkbox" id="btn">
<img id="bulb-off" src="https://blogger.googleusercontent.com/img/a/AVvXsEgR6iEB4t4vaOAHGQ2rsc2eDMgecFFfxRr7t5XroopAJuwTnNadawJjCL-YVSYwtAd_lrbCB8YbW6ZFbL31DGUtyNartTSfNZQ_-i11_GNcSTYO2DKFwPNY1PDndWgYKr4GB67Dp0PCZjwEWy_Tmk6KCB4sm09AVVUZ6K9QoDYD2MH10CUpF32E66AH8w=s395"
alt=" THis Source COde Downloaded From TheYourCode http://theyourcode.blogspot.com/">
<img id="bulb-on" src="https://blogger.googleusercontent.com/img/a/AVvXsEjQkdZsc3nI8sutKC8WcxqkaYiWaOVO4nmECCNjc6aJ8lZw0Tla3UazmAF6l-yMdMDb9I81fPQAojdgZHweBaClFIuT36zGeHilGhbuw22doro792yvkh9_cLkqP8O0QpA2HtV9qV312Ue-TXWJ6mPTc0sWi-zxxTpVT7gdI_lsmfTX2P5qeWjm_nKxow=s395"
alt=" THis Source COde Downloaded From TheYourCode http://theyourcode.blogspot.com/">
<label for="btn" class="btn">
<span></span>
</label>
</div>
<!-- Blub Area Ends -->
</body>
</html>
Post a Comment