Skip to content

Commit

Permalink
feat: Cria animações básicas.
Browse files Browse the repository at this point in the history
Resolve a issue #15.
  • Loading branch information
pianeiro committed Apr 18, 2023
1 parent 76e7bc1 commit 06023d8
Show file tree
Hide file tree
Showing 3 changed files with 37 additions and 4 deletions.
34 changes: 31 additions & 3 deletions css/style.css
Original file line number Diff line number Diff line change
Expand Up @@ -164,7 +164,8 @@ body > section:nth-child(odd) .article_illustration > img {

#project {
background-image: url(../img/project.png);
background-size: cover;
background-size: auto 100%;
background-position: center;
}

/* Layout - Espaçamentos */
Expand Down Expand Up @@ -388,7 +389,7 @@ section .content,

.menu a:hover,
.menu a:active {
font-weight: var(--font_extrabold);
font-weight: var(--font_extrabold) !important;
}

/* Estilo */
Expand Down Expand Up @@ -431,7 +432,7 @@ section .content,
bottom: var(--size_xs);
}

.menu:hover ol {
.menu.enabled ol {
display: block;
}

Expand Down Expand Up @@ -561,4 +562,31 @@ section .content,
display: inline-block;
}

}

/* Animação */

html {
scroll-behavior: smooth;
}

@media (min-width: 1280px) {

body > section {
background-size: 100%;
transition: background-size 0.5s ease-in-out;
}

body > section:hover {
background-size: 105%;
}

.article_illustration img {
transform: scale(1);
transition: transform .5s ease-out 100ms
}

.article_illustration:hover img {
transform: scale(1.025);
}
}
3 changes: 2 additions & 1 deletion index.html
Original file line number Diff line number Diff line change
Expand Up @@ -5,10 +5,11 @@
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<link rel="stylesheet" href="./css/style.css">
<script src="js/script.js" defer></script>
<title>Projeto Módulo 4</title>
</head>
<body>
<nav class="menu">
<nav class="menu" id="menu" onclick="menuToogle()">
<ol>
<li><a href="#header"><span>Início</span></a></li>
<li><a href="#project"><span>Projeto</span></a></li>
Expand Down
4 changes: 4 additions & 0 deletions js/script.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
function menuToogle () {
let menu = document.getElementById("menu")
menu.classList.toggle("enabled")
}

0 comments on commit 06023d8

Please sign in to comment.