Some good CSS techniques for Markup builders

Tram Ho

Introduce

Today I would like to share some CSS Technique for Markup people, although small and simple, not everyone knows it is very useful for practical work.

CSS Technique

1. Change the style to Dark Mode
To do this, simply use prefers-color-scheme: dark to change color from light to dark.
CSS

2. Scroll to each Section
This section will need scroll-snap to create scrolls according to each Section.
HTML

CSS

3. Remove heightlight when hovering mouse
This is useful with anchor links or buttons

4. Display the selected list for input field
This is quite similar to select dropdown, can choose options
HTML

CSS

Epilogue

Hopefully the above tips will be helpful for you to do Markup and see you guys in part 2.

Share the news now

Source : Viblo