Last active
March 4, 2024 05:48
-
-
Save unitycoder/bbf69568e0d325bda366df7c740d01eb to your computer and use it in GitHub Desktop.
HTML CSS Notes
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// https://github.com/atherosai/ui/tree/main/layout-01 | |
responsive grid layout | |
// blending mode css | |
https://hackernoon.com/a-css-property-that-every-web-designer-must-to-know-li6w36ca | |
// make website mobile friendly | |
- add viewport meta: (scale = 0 is no zoom) | |
<meta name="viewport" content="width=device-width, initial-scale=1.0"> | |
- test in chrome, better than firefox mobile preview | |
- test https://search.google.com/test/mobile-friendly | |
// make all divs scale with window and stay in position | |
<div id="container" style="position: relative;width:6vw;height:4vw;top:1vw;background:yellow"> | |
<div id="innerdiv1" style="z-index: 1; position:absolute; width: 3vw;2vw;background:red;">a</div> | |
<div id="innerdiv2" style="z-index: 2; position:absolute; width: 4vw;height:2vw;background:blue;left:0.2vw;top:0.2vw;"></div> | |
</div> | |
// make image not draggable (no ghost image when drag) | |
<img src="maps/wow.jpg" draggable="false" /> |
css typewriter effect
https://twitter.com/Prathkum/status/1437767620762079232
image with/as text overlay effect
https://codepen.io/denic/pen/mdXZgMG
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
You can use the loading=lazy attribute to defer the loading of the image until the user scrolls to them.
https://markodenic.com/html-tips/