Tags:

CSS

Animering af display fra block til none

Animation af elementer når display er sat til block er ikke specielt nemt, da værdien none bliver sat med i samme øjeblik CSS’en afvikles. Før i tiden skulle man rode med Javascript til den slags, meeeen, nu findes der heldigvis en (forholdsvis) nem løsning med ren CSS, der kan det samme.

See project

Smart trick med flexbox og margin block auto

Margin-block-auto er en smart måde at arbejde hurtigere og mere effektivt med flexbox-elementer.

See project

Quick look at nth-of-type

The nth-of-type selector allows you to select elements based on their position within a parent container. This opens up alot of possibilities for styling elements dynamically without using additional classes. Here’s how it works In the example below we use nth-of-type(n + 2) to select all div elements that are siblings of the same type […]

See project

Grid and min max width in CSS

Creating responsive layout can sometimes be tricky. There are many scenarioes you have to take into account and the old I-just-go-with-desktop-tablet-and-mobile doesn’t cut it anymore. But luckily there are some cool features in CSS to fix this. Flexible layout Combining display grid with min-max functions you have a powerfull tool for responsive layout in CSS. […]

See project

Make child element break out of parent container

I came across a cool feature in CSS where you can apply box-shadow and clip-path to an element inside a container to achieve an effect where the selected element fills the entire width of its parents parent container. This is ususally a tricky task, because the element is limitied to the width of the parent […]

See project
Scroll to Top