👆🏽 click to check the live page
This is a 1 page landing page.
480.mov
Tech used: HTML, CSS
- Set basic css first
*, *::before, *::after {
box-sizing: border-box;
}
body {
margin: 0;
font-family: 'Noto Sans JP', sans-serif;
line-height: 1.6;
}
- Style the reusable class first
clamp(min, prefer value, max)
Prefer value can be set to change with the viewport. The minumum and the maximum can prevent the font size to be too small or too huge.
In scss, we can nest the support
.hero {
@supports(property: value){
property: value;
}
}
In css, use it like this:
@support (property: value){
.class{
}
element{
}
}
shape-outside
property can achieve that. The shape can be the box sizing value, basic shapes like circle, ellipse, polygon, path or image. shape-margin
can create margin based on that shape. The effect stops at the image's bound.
We can use padding: 100% 100% 0 0
to create a real square in case the element is not a real square. Note that the percentage value in padding and margin percentage is with respect to the width.
Some special properties will cause elements to form a stacking context. The z-index
values were only compared among children elements.
Properties like below will form a stcking context:
-
position
withfixed
orsticky
value -
position
withrelative
orabsolute
value andz-index
is not 0 -
Children of a
flex
orgrid
container andz-index
is notauto
-
opacity
is less than 1 -
mix-blend-mode
is notnormal
-
Element with
transform
,filter
,perspective
,clip-path
,mask
/mask-image
/mask-border
and its value is notnone
The custom property is inherited so we should provide the value at the class or before.
Use background-blend-mode
. The common multiply
value can achieve the effect like printed two images on transparent film overlapping.