问题
I'm trying to find a HMTL code to create a magnifying glass that will magnify text on a website however I can only find codes for images.
Could anyone help me out please? I'm not very code literate i'm afraid!
回答1:
I think your best bet would be to use a CSS hover command for your text to scale up or down. (to keep things simple)
Something like this:
.grow:hover { transform: scale(1.1); }
BUT
If you are looking for a better explanation on the process, see @Andy 's answer to this question: How to simulate magnifying glass on Web-page image (Javascript)?
It goes more in depth on the creation of logic for a responsive magnifying glass feature across multiple web browsers. (also provides a great reference to get you more familiar with how html, css, and js work together)
来源:https://stackoverflow.com/questions/34069620/creating-magnifying-glass-on-website-for-text