Here is the example where apply css via JavaScript
<script>
const mstyle = document.head.appendChild(document.createElement(‘style’));
style.textContent = /*this is the css*/`
.myclass {
aspect-ratio: 16 / 9; background-color: #000;
position: relative; display: block; contain: content;
background-position: center center;
background-size: cover;
}
#mydivid {
color:green; opacity: 0;
}
`;
</script>
Sunday, March 10, 2024
Apply CSS via JavaScript
Image Zoom Hover Effect
Image Zoom Hover Effect Image zoom hover out effect ...
0 comments:
Post a Comment