Lab #18.2 Flex Panel Gallery
Lab #18.2 is titled "Flex Panel Gallery". In this lab, I had created 5 panels in HTML, and then I used JavaScript and CSS to turn them into images that expand in more text if you click on it. For instance, if you click on "BEEN", it will expand into "I'VE BEEN GRINDING". This signifies that I am doing this lab late at night and I want to sleep but I'm dedicated to my work so I'll get it done, indicating the "grind". Anyways, if you click on any of the panels, they expand into more text. I'll leave you to explore it.
To create these functioning panels, I used a combination of HTML, CSS, and JavaScript. In my HTML, I stored all of the panels in a div with the class name "panels" which I then made the 5 individual panels inside of it. Using CSS, I formatted the panel's spacing the way I wanted to, in order to fit the page of course. There were other properties I edited here like the text color and the images which I do not own. Moving onto the JavaScript, I made functions to toggle the panels and if statements to check whether the user was clicking a panel and which specific one. Once the JavaScript registers that a user has clicked a panel, that panel is then extended to show the hidden text that lies in that panel.
Web designers can use these kind of panels to make their webpages more elegant as it gives a sense of proficiency in the web design field. The images can be changed and the text can be used to represent something. For example, a web designer might want to raise awareness of an issue like global warming and make the panels say something like "LET'S SAVE EARTH" and etc. The images can also be altered to their accord if they know how the code works.
(The reason I am calling this lab 18.2 is because it was titled as lab #18 but there was already a lab 18 and changing the names of all the other labs to make this #19 would send my soul to heaven).

Comments
Post a Comment