Skip to content
Public template

About

Code snippets for my classes of Design of Web Interfaces: CSS, js, Bootstrap and more

Topics

Resources

Stars

8 stars

Watchers

1 watching

Forks

Repository files navigation

CSS AND JS SNIPPETS

⚠️ This repo is a work in progress ⚠️

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!!)

Short Snippets

  • Including CSS and JS files in an HTML doc

Advanced CSS

  • CSS Flexbox
  • CSS Grid

Interactive Elements

Menu

  • Top Menu simple. A simple and complete top navigation menu. Uses <ul>
  • 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/

Sidebar

  • 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

Variations

  • Top Menu Fixed. en fer scroll, manté la seva posició. Doman el valor position: fixed al 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)

Modal (Pop Up) Windows

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)

Overlay

An Overlay it’s an area that appears in top of the contents that’s being displayed in the viewport

Parallax Effect

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

Tabs

logo

About

Code snippets for my classes of Design of Web Interfaces: CSS, js, Bootstrap and more

Topics

Resources

Stars

8 stars

Watchers

1 watching

Forks

Used by

Contributors

Languages