WordPress

Allgemein

Technik

Design

Konzept

WordPress Plugins

Interessantes

Vermarktung

Themen

Font / Schriften

Social Media

Youtube

eCommerce

Gemischtes

Kolumne

Webinar

Blog Archiv

Kurse / Webinare

Meine nächste Webinare / Kurse

Kreative Webseite mit Slide-In Menu [HTML & CSS & JS]

von | Jan 14, 2021 | Allgemein | 0 Kommentare

Schlagwörter: CSS - HTML - Webdesign

Wer meine wöchentliche Inspiration Show am Freitag Nachmittag sieht, der weiss bereits bereits, dass ich ein absolute Fan von kreativen Webseiten bin. Je verrückter das Design desto besser gefällt es mir. Bei den meisten Webseiten schlafen mir heute die Füsse ein.

Aus diesem Grund möchte ich euch heute ein Webdesign zeigen mit einem kreativen Menu. Dieses Menu ist ein Slide-In Menu – das heisst das Menu ist eigentlich versteckt. Wenn man dann auf den Menu-Button klickt, verschiebt sich die Webseite ein wenig nach Rechts und das Menu wird sichtbar. Sowas sieht man selten, meistens ist so ein verstecktes Menu ein einfache Overlay über die ganze Seite. Hier aber siehts ein wenig anders aus.

Ich zeuge euch heute in knapp 50min wie man eine Webseite erstellt, die ein Videohintergrund hat und ein Slide-In Menu besitzt.

Geniale Gratis Video für sowas findet man unter https://www.pexels.com/video

DEMO

Video

HTML

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
   <section class="showcase">
    <header>
        <h2 class="logo">Reisen</h2>
        <div class="toggle">   
        </div>
    </header>
    <video src="strand.mp4" muted loop autoplay></video>
    <div class="overlay"></div>
    <div class="text">
        <h2>Hör nie auf</h2>
        <h3>Geniesse das Leben und diese Ferien</h3>
        <p>Lorem ipsum dolor sit amet consectetur adipisicing elit. Voluptas, ex. Repellat amet autem, et magnam quos magni, nulla provident, harum commodi labore cum unde voluptatibus eveniet sunt! Omnis, placeat officiis?</p>
    <a href="#">Entdecken</a>
    </div>
 
    <ul class="social">
        <li><a href="#"><img src="img/facebook.png"></a></li>
        <li><a href="#"><img src="img/twitter.png"></a></li>
        <li><a href="#"><img src="img/instagram.png"></a></li>
    </ul>
   </section>
   <div class="menu">
    <ul>
        <li><a href="#">Home</a></li>
        <li><a href="#">Blog</a></li>
        <li><a href="#">Destinationen</a></li>
        <li><a href="#">Über mich</a></li>
        <li><a href="#">Kontakt</a></li>
    </ul>
   </div>

CSS

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
 @import url('https://fonts.googleapis.com/css?family=Poppins:200,300,400,500,600,700,800,900&display=swap');
    *
    {
      margin: 0;
      padding: 0;
      box-sizing: border-box;
      font-family: 'Poppins', sans-serif;
    }
    header
    {
      position: absolute;
      top: 0;
      left: 0;
      width: 100%;
      padding: 40px 100px;
      z-index: 1000;
      display: flex;
      justify-content: space-between;
      align-items: center;
    }
    header .logo
    {
      color: #fff;
      text-transform: uppercase;
      cursor: pointer;
    }
    .toggle
    {
      position: relative;
      width: 60px;
      height: 60px;
      background: url(img/menu.png);
      background-repeat: no-repeat;
      background-size: 30px;
      background-position: center;
      cursor: pointer;
    }
    .toggle.active
    {
      background: url(img/close.png);
      background-repeat: no-repeat;
      background-size: 25px;
      background-position: center;
      cursor: pointer;
    }
    .showcase
    {
      position: absolute;
      right: 0;
      width: 100%;
      min-height: 100vh;
      padding: 100px;
      display: flex;
      justify-content: space-between;
      align-items: center;
      background: #111;
      transition: 0.5s;
      z-index: 2;
    }
    .showcase.active
    {
      right: 300px;
    }
 
    .showcase video
    {
      position: absolute;
      top: 0;
      left: 0;
      width: 100%;
      height: 100%;
      object-fit: cover;
      opacity: 0.8;
    }
    .overlay
    {
      position: absolute;
      top: 0;
      left: 0;
      width: 100%;
      height: 100%;
      background: #03a9f4; /* video overlay einfärben */
      mix-blend-mode: overlay;
    }
    .text
    {
      position: relative;
      z-index: 10;
    }
 
    .text h2
    {
      font-size: 5em;
      font-weight: 800;
      color: #fff;
      line-height: 1em;
      text-transform: uppercase;
    }
    .text h3
    {
      font-size: 4em;
      font-weight: 700;
      color: #fff;
      line-height: 1em;
      text-transform: uppercase;
    }
    .text p
    {
      font-size: 1.1em;
      color: #fff;
      margin: 20px 0;
      font-weight: 400;
      max-width: 700px;
    }
    .text a
    {
      display: inline-block;
      font-size: 1em;
      background: #fff;
      padding: 10px 30px;
      text-transform: uppercase;
      text-decoration: none;
      font-weight: 500;
      margin-top: 10px;
      color: #111;
      letter-spacing: 2px;
      transition: 0.2s;
    }
    .text a:hover
    {
      letter-spacing: 6px;
    }
    .social
    {
      position: absolute;
      z-index: 10;
      bottom: 20px;
      display: flex;
      justify-content: center;
      align-items: center;
    }
    .social li
    {
      list-style: none;
    }
    .social li a
    {
      display: inline-block;
      margin-right: 20px;
      filter: invert(1);
      transform: scale(0.5);
      transition: 0.5s;
    }
    .social li a:hover
    {
      transform: scale(0.5) translateY(-15px);
    }
    .menu
    {
      position: absolute;
      top: 0;
      right: 0;
      width: 300px;
      height: 100%;
      display: flex;
      justify-content: center;
      align-items: center;
    }
    .menu ul
    {
      position: relative;
    }
    .menu ul li
    {
      list-style: none;
    }
    .menu ul li a
    {
      text-decoration: none;
      font-size: 24px;
      color: #111;
    }
    .menu ul li a:hover
    {
      color: #03a9f4; 
    }
 
    @media (max-width: 991px)
    {
      .showcase,
      .showcase header
      {
        padding: 40px;
      }
      .text h2
      {
        font-size: 3em;
      }
      .text h3
      {
        font-size: 2em;
      }
    }

Javascript

1
2
3
4
5
6
7
const menuToggle = document.querySelector('.toggle');
     const showcase = document.querySelector('.showcase');
 
     menuToggle.addEventListener('click', () => {
       menuToggle.classList.toggle('active');
       showcase.classList.toggle('active');
     })




0 Kommentare

Einen Kommentar abschicken

Deine E-Mail-Adresse wird nicht veröffentlicht. Erforderliche Felder sind mit * markiert