Flat Button
How do I make an flat button?
What is a flat button? How do you make a flat button? This script and codes were developed by ULRIKA PAN on 20 December 2022, Tuesday.
Flat Button - Script Codes HTML Codes
<!DOCTYPE html>
<html >
<head> <meta charset="UTF-8"> <title>Flat Button</title> <link rel='stylesheet prefetch' href='https://fonts.googleapis.com/css?family=Comfortaa:300,400,700'> <link rel="stylesheet" href="css/style.css">
</head>
<body>
<nav class="menu" id="menu"> <input class="menu__input" id="toggle_portfolio" type="radio" name="menu" value="portfolio"/> <label class="buttons buttonA" for="toggle_portfolio">PORTFOLIO</label> <input class="menu__input" id="toggle_aboutMe" type="radio" name="menu" value="aboutMe"/> <label class="buttons buttonB" for="toggle_aboutMe">ABOUT ME</label>
</nav> <script src='https://cdnjs.cloudflare.com/ajax/libs/jquery/3.2.1/jquery.min.js'></script> <script src="js/index.js"></script>
</body>
</html>
Flat Button - Script Codes CSS Codes
* { font-family: "Comfortaa", "cursive";
}
body { padding: 0px; margin: 0px; width: 100%; height: 100%; background-color: #212222; transition: 0.5s ease-in-out;
}
body.light_bg { background-color: #fff;
}
.menu { width: 100%;
}
.menu input.menu__input[type="radio"] { display: none; font-weight: 700; width: vw; box-sizing: border-box;
}
.menu input.menu__input[type="radio"]:checked + label.buttons { transform: translate(0px, 7px);
}
.menu input.menu__input[type="radio"]:checked + label.buttons.buttonA { box-shadow: 0px 5px #25abba; color: #fff; text-shadow: 0px 0px 20px #fff, 0px 0px 30px #fff, 0px 0px 40px #fff;
}
.menu input.menu__input[type="radio"]:checked + label.buttons.buttonB { box-shadow: 0px 5px #f24b9f; color: #fff; text-shadow: 0px 0px 20px #fff, 0px 0px 30px #fff, 0px 0px 40px #fff;
}
.menu label.buttons { display: inline-block; width: 49.6%; box-sizing: border-box; letter-spacing: 3px; text-align: center; cursor: pointer; padding: 25px 0px 25px 0px; border-radius: 10px; transition: 0.2s ease-in-out;
}
.menu label.buttons.buttonA { background-color: #50CEDC; box-shadow: 0px 12px #2abfd0; color: #2198a5;
}
.menu label.buttons.buttonA:hover { background-color: #65d4e0;
}
.menu label.buttons.buttonB { background-color: #F792C5; box-shadow: 0px 12px #f462ac; color: #f03392;
}
.menu label.buttons.buttonB:hover { background-color: #f9aad2;
}
Flat Button - Script Codes JS Codes
$('#menu input').on('change', function() { var menu_val = $('input:checked', '#menu').val(); if(menu_val == "portfolio"){ $('body').addClass('light_bg'); }else if(menu_val == "aboutMe"){ $('body').removeClass('light_bg'); };
});
Developer | ULRIKA PAN |
Username | ulrikapan |
Uploaded | December 20, 2022 |
Rating | 3 |
Size | 3,153 Kb |
Views | 10,120 |
Find the perfect freelance services for your business! Fiverr's mission is to change how the world works together. Fiverr connects businesses with freelancers offering digital services in 500+ categories. Find Developer!
Name | Size |
Contact form | 4,381 Kb |
Icon1 MG | 2,595 Kb |
Neon text 01 | 2,540 Kb |
SVG social icon | 3,300 Kb |
Wave button | 2,498 Kb |
Weather Box | 6,637 Kb |
Slide Down Page | 3,093 Kb |
Slide out navigation-1 | 4,826 Kb |
Facebook Profile -UI Practice | 4,152 Kb |
SVG Animate | 3,882 Kb |
Jasper is the AI Content Generator that helps you and your team break through creative blocks to create amazing, original content 10X faster. Discover all the ways the Jasper AI Content Platform can help streamline your creative workflows. Start For Free!
Name | Username | Size |
Guidepopup | Wooljs | 3,747 Kb |
Brian The CSS Bee | Jonitrythall | 3,922 Kb |
Light Switch | Bartuc | 4,933 Kb |
Hello People | Danburrows | 2,365 Kb |
RSW | JordanC | 3,726 Kb |
Ball physics | Blackkbot | 3,874 Kb |
Snow collision | Wojtek1150 | 3,542 Kb |
TinFoil Boats | Chandralil | 4,577 Kb |
A bit of elegance | Hackthevoid | 9,095 Kb |
Pure CSS Dial | Lukewatts | 3,018 Kb |
Surf anonymously, prevent hackers from acquiring your IP address, send anonymous email, and encrypt your Internet connection. High speed, ultra secure, and easy to use. Instant setup. Hide Your IP Now!