A collection of snippets for my classes of the module Design of Web Interfaces. Copy them and modify the code to adapt to your application. Remember always try to improve your code and remove what is unnecessary (certainly you can improve these snippets too!!)
- Including CSS and JS files in an HTML doc
- CSS Flexbox
- CSS Grid
- Accordion - Basic example
- Animated Search bar input field. I.e: wook.pt, onallibres.cat, casadellibro.com
- Basic Animated Search Input
- Manual Slideshow
- Automatic Slideshow I / Automatic Slideshow II
- Cookies Alert: on Top in bbc.com (also here) / at the bottom and using opacity / centered
- Top Menu simple. A simple and complete top navigation menu. Uses <ul>
- Com crear un Dropdown totsol: aqui funciona amb hover i aqui, en clicar a sobre
- El mateix exemple amb diferent implementació: aqui
- Top Menu semiresponsive. El primer element del menu superior es manté en fer-se responsive. Codi original: aqui
- Tom Menu total responsive. Tots els elements s'oculten en fer-se responsiu. Se dedueix fàcilment de l'anterior. Atenció: tant aquest com l'anterior menu, si se volen emprar en MÒBIL, s'hauria de modificar el menu per a desplegar-se en clicar, no en navegar per sobre (hover)
- Top Menu mobile. Per a mòbil. No inclou submenus. Codi original aquí
- https://css-tricks.com/solved-with-css-dropdown-menus/
- Fixed Sidebar Menu. Fés-li un cop d'ull aquí
- Fixed Sidebar Menu w/Dropwown. Fés-li un cop d'ull aqui
- Responsive Sidebar Menu. Un menu sidebar se pot fer responsive molt més fàcilment que un top nav menu. Codi original: aqui
- Top Menu Fixed. en fer scroll, manté la seva posició. Doman el valor
position: fixedal menu superior. - Top Menu Hide on scroll. Codi original aqui
- Mega Menu. Just like a simple top menu, with more areas. Fés-li un cop d'ull aquí
- Sub Navigation Menu. El dropdown desplegat és horitzontal en lloc de vertical. Fés-li un cop d'ull aquí
- Full Screen Overlay Navigation*. El menú es desplega a tota pàgina, amb una CSS transition: [aqui](Full screen Overlay Navigation)
A Pop Up is a window that appears in top of the contents that’s being displayed in the viewport. It’s limited to a small area and has a limited function (normally a form or a warning)
An Overlay it’s an area that appears in top of the contents that’s being displayed in the viewport
- Full screen overlay effect (with Transition and opacity effect
- Full Screen Transition Overlay (with also a Transition on the text of the links)
Parallax is the apparent displacement of a object because there's movement in the observer.
- Basic parallax with fixed image. La imatge es manté fixa i en fer scroll, el text hi passa per sobre. Codi original aqui
- Use a library to implement Parallax effect that add a dynamic feel to your interfaces. For instance: simplePARALLAX.js
