Flat Button

Developer
Size
3,153 Kb
Views
10,120

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 Previews

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'); };
});
Flat Button - Script Codes
Flat Button - Script Codes
Home Page Home
Developer ULRIKA PAN
Username ulrikapan
Uploaded December 20, 2022
Rating 3
Size 3,153 Kb
Views 10,120
Do you need developer help for Flat Button?

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!

ULRIKA PAN (ulrikapan) Script Codes
Create amazing video scripts with AI!

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!