From 07d60b00e696fc79d9f4117d2bf89813e91b9120 Mon Sep 17 00:00:00 2001 From: Danny Romero <108970600+Elenar9@users.noreply.github.com> Date: Wed, 22 Feb 2023 01:32:52 +0000 Subject: [PATCH 1/7] HTML-CSS-Coursework-Week4 update html ,css and Js --- css/main.css | 100 +++++++++++++++++++++++++++++++++++++++++++++++++-- css/week4.js | 5 +++ index.html | 33 +++++++++++++---- 3 files changed, 130 insertions(+), 8 deletions(-) create mode 100644 css/week4.js diff --git a/css/main.css b/css/main.css index aa561706..3f619814 100644 --- a/css/main.css +++ b/css/main.css @@ -1,3 +1,99 @@ -/* Add your CSS here */ -/* Dont' forget to link this file to your HTML in the
*/ + +.header { + display: flex; + flex-direction: row; + width: 100%; + justify-content: space-between; +} +.header-content { +display: flex; +flex-direction: column; + +} +.square { + background-color: blue; + height: 2rem; + width: 2rem; + margin-right: 1rem; + +} +.first-header { + display: flex; + flex-direction: row; + align-items: center; + +} + +@import "compass/css3"; +.menu-toggle { + width: 40px; + height: 30px; + position: absolute; + top: 20px; + right: 25px; + cursor: pointer; + + &.on { + .one { + @include transform(rotate(45deg) translate(7px, 7px)); + } + + .two { + opacity: 0; + } + + .three { + @include transform (rotate(-45deg) translate(8px, -10px)); + } + } +} + +.one, +.two, +.three { + width: 100%; + height: 5px; + background: white; + margin: 6px auto; + backface-visibility: hidden; + @include transition-duration(0.3s); +} + +nav ul { + margin: 0; + padding: 0; + font-family: Open Sans; + list-style: none; + margin: 4em auto; + text-align: center; + + &.hidden { + display: none; + } + + a { + @include transition-duration(0.5s); + text-decoration: none; + color: white; + font-size: 3em; + line-height: 1.5; + width: 100%; + display: block; + + &:hover { + background-color: rgba(0, 0, 0, 0.5); + } + } +} + +.menu-section { + &.on { + z-index: 10; + width: 100%; + height: 100%; + display: block; + background-color: rgba(0, 0, 0, 0.5); + position: absolute; + } +} diff --git a/css/week4.js b/css/week4.js new file mode 100644 index 00000000..f39e4020 --- /dev/null +++ b/css/week4.js @@ -0,0 +1,5 @@ + $(".menu-toggle").on('click', function () { + $(this).toggleClass("on"); + $('.menu-section').toggleClass("on"); + $("nav ul").toggleClass('hidden'); + }); \ No newline at end of file diff --git a/index.html b/index.html index cd704c69..af3cbc4b 100644 --- a/index.html +++ b/index.html @@ -4,18 +4,39 @@ - +This website design was created by Wix.com, and is used here for strictly educational purposes.
+ +