CSS learnings
September 04, 2019
Transform Style
- transform-style property works on the parent
transform-style:preserve-3d;
- transform-style on the parent helped to make the translate3d work in the z-direction for the child
transform:translate3d(0px,0px,-0px);
Perspective
- Perspective also works on the parent and children
- This is the distance from the z-plane
transform:perspective(60px);
Background size
- Background size can accept cover which makes the background image to cover the full view.
background-size:cover;
Toggle in JavaScript
The JAVASCRIPT provides API to toggle a class in the DOM Node. This would help us in the use cases of toggling a class on A DOM. It also accepts second parameter which is a condition to execute the toggle.
domNode.classList.toggle('hover', true);