Skip to content
Snippets Groups Projects
Commit a526f596 authored by Giildo's avatar Giildo
Browse files

:tada: First commit

parents
No related merge requests found
body {
margin: 0;
}
section {
height: 100vh;
display: grid;
align-items: center;
justify-items: center;
grid-template-columns: 1fr;
@media (width > 720px) {
grid-template-columns: 1fr 1fr;
}
@media (width > 960px) {
grid-template-columns: 1fr 1fr 1fr;
}
div {
width: 100px;
height: 100px;
&:first-child {
background-color: red;
}
&:nth-child(2) {
background-color: brown;
}
&:nth-child(3) {
background-color: rebeccapurple;
}
&:nth-of-type(4) {
background-color: blue;
}
&:last-of-type {
background-color: yellow;
}
}
}
nav {
height: 64px;
display: flex;
justify-content: flex-end;
ul {
display: flex;
gap: 8px;
list-style: none;
padding: 0 8px 0 0;
margin: 0;
li {
display: flex;
justify-content: center;
align-items: center;
}
}
}
\ No newline at end of file
const button = document.getElementById('dialog-open-btn')
button.addEventListener('click', () => {
const dialog = document.querySelector('dialog')
dialog.showModal()
dialog.addEventListener('click', () => {
dialog.close()
})
})
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8"/>
<meta name="viewport" content="width=device-width, initial-scale=1.0"/>
<title>Document</title>
<link rel="stylesheet" href="assets/css/style.css">
<script src="assets/js/dialog.js" type="module"></script>
</head>
<body>
<nav>
<ul>
<li>Accueil</li>
<li>About</li>
<li>Contact</li>
</ul>
</nav>
</body>
</html>
\ No newline at end of file
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment