Responsive css icon

Size
2,967 Kb
Views
8,096

How do I make an responsive css icon?

Part of a gamepad from http://codepen.io/beedesigned/pen/WbZzQx?editors=110 BEM style & responsive. What is a responsive css icon? How do you make a responsive css icon? This script and codes were developed by Fedor Troitsky on 11 November 2022, Friday.

Responsive css icon Previews

Responsive css icon - Script Codes HTML Codes

<!DOCTYPE html>
<html >
<head> <meta charset="UTF-8"> <title>responsive css icon</title> <link rel="stylesheet" href="css/style.css">
</head>
<body> <div class="icon"> <div class="icon__"> <div class="pad"> <div class="pad__btn-block pad__btn-block--left"> <div class="pad__btn pad__btn--blue"></div> <div class="pad__btn pad__btn--green"></div> </div> <div class="pad__btn-block pad__btn-block--right"> <div class="pad__btn pad__btn--red"></div> <div class="pad__btn pad__btn--yellow"></div> </div> </div> </div> <img class="icon__scaling-img" src="data:image/gif;base64,R0lGODlhAQABAIAAAP7//wAAACH5BAAAAAAALAAAAAABAAEAAAICRAEAOw==" />
</div>
</body>
</html>

Responsive css icon - Script Codes CSS Codes

/* Part of a gamepad from https://codepen.io/beedesigned/pen/WbZzQx?editors=110 */
/* recreated with BEM style & responsiveness */
/* internal sizes */
.icon { position: relative; width: auto; height: auto;
}
.icon__ { position: absolute; top: 0; left: 0; right: 0; bottom: 0; overflow: hidden;
}
.icon__scaling-img { position: relative; visibility: hidden; width: 100%; max-width: 100%; /* max-height: 100%; */
}
.pad { width: 100%; height: 100%; position: relative; background: #383d43; border-radius: 100%;
}
.pad__btn-block { width: 25%; height: 60%; position: absolute; background: #24292f; border-radius: 1000px;
}
.pad__btn-block--left { -webkit-transform: rotate(45deg); transform: rotate(45deg); -webkit-transform-origin: 50% 20%; transform-origin: 50% 20%; top: 13%; left: 37.5%;
}
.pad__btn-block--right { -webkit-transform: rotate(45deg); transform: rotate(45deg); -webkit-transform-origin: 50% 80%; transform-origin: 50% 80%; bottom: 13%; left: 37.5%;
}
.pad__btn { width: 65%; height: 26%; position: absolute; border-radius: 100%;
}
.pad__btn--green { left: 17.5%; bottom: 8.75%; background: #82e6a0;
}
.pad__btn--blue { left: 17.5%; top: 8.75%; background: #6482fa;
}
.pad__btn--red { left: 17.5%; top: 8.75%; background: #fa64be;
}
.pad__btn--yellow { left: 17.5%; bottom: 8.75%; background: #fae664;
}
/* for demo */
html,
body { height: 100%;
}
body { background: #191e1e;
}
Responsive css icon - Script Codes
Responsive css icon - Script Codes
Home Page Home
Developer Fedor Troitsky
Username ftroitsky
Uploaded November 11, 2022
Rating 3
Size 2,967 Kb
Views 8,096
Do you need developer help for Responsive css icon?

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!

Fedor Troitsky (ftroitsky) Script Codes
Create amazing captions 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!