Creating Magnifying Glass on website for text

旧巷老猫 提交于 2019-12-12 04:09:18

问题


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

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!