<ul></ul>
@import url("https://fonts.googleapis.com/css2?family=Exo:wght@600&display=swap");
* {
margin: 0;
padding: 0;
box-sizing: border-box;
}
body {
width: 100vw;
min-height: 100vh;
display: flex;
justify-content: center;
align-items: center;
flex-direction: column;
gap: 20px;
font-family: "Exo", Arial, sans-serif;
background-color: #f7f7f7;
}
ul {
display: grid;
grid-template-columns: repeat(auto-fit, minmax(100px, 1fr));
gap: 10px;
list-style: none outside none;
width: 100%;
padding: vw;
place-items: center;
}
li {
padding: 30px;
font-size: clamp(20px, 20vw + 2rem, 30px);
place-self: center;
}
const ulElement = document.querySelector("ul");
let emojis = [
0x1f600,
0x1f604,
0x1f34a,
0x1f344,
0x1f37f,
0x1f363,
0x1f370,
0x1f355,
0x1f354,
0x1f35f,
0x1f6c0,
0x1f48e,
0x1f5fa,
0x23f0,
0x1f579,
0x1f4da,
0x1f431,
0x1f42a,
0x1f439,
0x1f424,
0x1f493,
0x1f49e,
0x1f970,
0x1f929
];
emojis.forEach((emoji) => {
const liElement = document.createElement("li");
liElement.textContent = String.fromCodePoint(emoji);
ulElement.append(liElement);
});
View Compiled
This Pen doesn't use any external CSS resources.
This Pen doesn't use any external JavaScript resources.