
7

NaNtendo (3D CSS Nintendo NES without images)
source link: https://codepen.io/manz/pen/dyzgWbo
Go to the source link to view the article. You can view the picture content, updated content and better typesetting reading experience. If the link is broken, please click the button below to view the snapshot at that time.

Pen Settings
HTML Preprocessor
Add Class(es) to <html>
Stuff for <head>
0 unsaved changes
xxxxxxxxxx
<div class="container">
<nes-console></nes-console>
<nes-controller></nes-controller>
</div>
<div class="created">
<span>Created by</span>
<a href="https://manz.dev/"><h2>Manz.dev</h2></a>
<p>on <a href="https://twitch.tv/ManzDev">Twitch</a> / <a href="https://youtu.be/tnTi5ocYa4o">Youtube</a></p>
</div>
CSS (PostCSS)
CSS (PostCSS)
xxxxxxxxxx
@use postcss-nested;
@font-face {
font-family: "Pretendo";
src:
url("https://manzdev.github.io/twitch-nintendo-nes/fonts/pretendo.woff2") format("woff2"),
url("https://manzdev.github.io/twitch-nintendo-nes/fonts/pretendo.woff") format("woff");
font-display: swap;
}
@font-face {
font-family: "Press Start 2P";
src:
url("https://manzdev.github.io/twitch-nintendo-nes/fonts/press-start-2p.woff2") format("woff2"),
url("https://manzdev.github.io/twitch-nintendo-nes/fonts/press-start-2p.woff") format("woff");
font-display: swap;
JS (Babel)
JS (Babel)
xxxxxxxxxx
class CircleButton extends HTMLElement {
constructor() {
super();
this.attachShadow({ mode: "open" });
}
static get styles() {
return /* css */`
.container {
--size: calc(var(--width) * 0.10);
background: #CECECE;
border-radius: 3px;
width: var(--size);
height: var(--size);
display: flex;
justify-content: center;
align-items: center;
}
.button {
width: calc(var(--size) * 0.8);
Recommend
About Joyk
Aggregate valuable and interesting links.
Joyk means Joy of geeK