Skip to content

Tag: css

Moving canvas with translate() method

According to MDN documentation translate() method “moves the canvas and its origin” but the below code does not move the border of the canvas. If the translate() method moves the canvas shouldn’t the border move as well? Answer I don’t quite understand what you are trying to do. If you…

Show and hide div in react js

How do I hide my page “section” when I click on a button. and show it another button is clicked Here’s my code how do i make the onClick event work it out? Answer Just set a state let’s call it for example hide and set default value false, and on the button click turn it to true. And y…

Hide search elements in Javascript

In the following example code I want to hide the elements that show under the search field. Code is from W3: https://www.w3schools.com/howto/howto_js_filter_lists.asp Search elements should only show when users starts typing in the search field. Nothing complex just looking for solution for beginner. Thanks A…