Created
September 28, 2023 14:32
-
-
Save jsongerber/8e02a46f994bdae5627d3a886cbf8645 to your computer and use it in GitHub Desktop.
style.css
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* http://meyerweb.com/eric/tools/css/reset/ | |
v2.0 | 20110126 | |
License: none (public domain) | |
*/ | |
html, body, div, span, applet, object, iframe, | |
h1, h2, h3, h4, h5, h6, p, blockquote, pre, | |
a, abbr, acronym, address, big, cite, code, | |
del, dfn, em, img, ins, kbd, q, s, samp, | |
small, strike, strong, sub, sup, tt, var, | |
b, u, i, center, | |
dl, dt, dd, ol, ul, li, | |
fieldset, form, label, legend, | |
table, caption, tbody, tfoot, thead, tr, th, td, | |
article, aside, canvas, details, embed, | |
figure, figcaption, footer, header, hgroup, | |
menu, nav, output, ruby, .latest-posts, summary, | |
time, mark, audio, video { | |
margin: 0; | |
padding: 0; | |
border: 0; | |
font-size: 100%; | |
font: inherit; | |
vertical-align: baseline; | |
} | |
/* HTML5 display-role reset for older browsers */ | |
article, aside, details, figcaption, figure, | |
footer, header, hgroup, menu, nav, .latest-posts { | |
display: block; | |
} | |
body { | |
line-height: 1; | |
} | |
ol, ul { | |
list-style: none; | |
} | |
blockquote, q { | |
quotes: none; | |
} | |
blockquote:before, blockquote:after, | |
q:before, q:after { | |
content: ''; | |
content: none; | |
} | |
table { | |
border-collapse: collapse; | |
border-spacing: 0; | |
} | |
video, | |
img { | |
width: 100%; | |
height: auto; | |
} | |
.menu { | |
display: flex; | |
margin-top: 1rem; | |
} | |
.menu li { | |
padding: 1rem; | |
} | |
.menu a { | |
color: black; | |
} | |
.latest-posts > div { | |
min-height: 100px; | |
} | |
.latest-posts .intro { | |
background-color: green; | |
} | |
.latest-posts > div:nth-child(2) { | |
background-color: red; | |
height: auto; | |
} | |
.latest-posts > div:nth-child(3) { | |
background-color: purple; | |
} | |
.latest-posts > div:first-child {} | |
.latest-posts > div:last-child {} | |
.titre-image { | |
position: relative; | |
} | |
.titre-image .image { | |
height: 50px; | |
background-color: rgba(255,255,255,0.5); | |
border: 2px solid white; | |
} | |
.titre-image h2 { | |
position: absolute; | |
top: 0; | |
left: 50px; | |
} | |
nav { | |
z-index: 9999; | |
position: relative; | |
} | |
.menu li { | |
/* transform: scale(1) translateX(100%) rotate(0) skew(30deg); */ | |
position: relative; | |
/* animation-name: move; | |
animation-duration: 4s; | |
animation-timing-function: ease; | |
animation-iteration-count: infinite; | |
animation-direction: alternate-reverse; */ | |
box-shadow: 1px 1px 1px black; | |
} | |
main { | |
max-width: 600px; | |
margin: auto; | |
} | |
.menu-button { | |
display: none; | |
} | |
@keyframes move { | |
0% { | |
transform: translateX(10px); | |
background-color: red; | |
} | |
37% { | |
transform: translateX(-30px); | |
background-color: green; | |
} | |
100% { | |
transform: translateX(200px); | |
background-color: yellow; | |
} | |
} | |
.menu li:first-child { | |
/* transform: translateY(200px); */ | |
} | |
.sous-menu { | |
position: absolute; | |
top: 100%; | |
left: 0; | |
background-color: #fff; | |
box-shadow: 0px 4px 20px rgba(0,0,0,0.5); | |
white-space: nowrap; | |
transform: translateY(-30px); | |
opacity: 0; | |
transition: transform 0.3s ease, opacity 0.3s ease; | |
pointer-events: none; | |
} | |
h2 { | |
cursor: pointer; | |
} | |
.menu li:hover > .sous-menu { | |
transform: translateY(0); | |
opacity: 1; | |
pointer-events: auto; | |
} | |
a { | |
text-decoration: none; | |
transition: color 0.2s ease-in; | |
} | |
a:hover { | |
color: red; | |
} | |
.menu a:hover { | |
color: green; | |
} | |
.drop { | |
width: 100px; | |
height: 100px; | |
padding: 20px; | |
background-color: black; | |
} | |
.drop svg { | |
width: 100%; | |
height: 100%; | |
} | |
.drop svg path:nth-child(3) { | |
stroke-dashoffset: 240; | |
stroke-dasharray: 240; | |
/* animation: svg 2s ease-in-out alternate infinite; */ | |
} | |
@keyframes svg { | |
from { | |
stroke-dashoffset: 240; | |
} | |
to { | |
stroke-dashoffset: 0; | |
} | |
} | |
@media screen and (max-width: 600px) { | |
.latest-posts .intro { | |
background-color: red; | |
font-size: 10px; | |
} | |
.menu { | |
display: block; | |
opacity: 0; | |
transform: translateY(-100%); | |
pointer-events: none; | |
transition: transform 0.2s ease, opacity 0.2s ease; | |
} | |
.menu.open { | |
opacity: 1; | |
transform: translateY(0); | |
pointer-events: auto; | |
} | |
.menu-button { | |
display: block; | |
position: relative; | |
width: 40px; | |
height: 40px; | |
} | |
.menu-button::before, | |
.menu-button::after { | |
content: ""; | |
position: absolute; | |
width: 30px; | |
height: 2px; | |
background-color: black; | |
left: 50%; | |
margin-left: -15px; | |
top: 20px; | |
transform-origin: center center; | |
transition: transform 0.2s ease; | |
} | |
.menu-button::after { | |
top: 26px; | |
} | |
.menu-button.open::before { | |
transform: translateX(-3px) rotate(-45deg); | |
} | |
.menu-button.open::after { | |
transform: translateX(-3px) rotate(45deg); | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment