在网站上为文本创建放大镜 [英] Creating Magnifying Glass on website for text
问题描述
我试图找到一个HMTL代码来创建一个放大镜,该放大镜可以放大网站上的文字,但是我只能找到图像的代码.
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!
推荐答案
我认为最好的选择是对文本使用CSS悬停命令来放大或缩小.(为简单起见)
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)
类似这样的东西:
.grow:hover { transform: scale(1.1); }
但是
如果您希望对过程进行更好的解释,请参阅@Andy对这个问题的回答:
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)?
在跨多个Web浏览器的响应式放大镜功能的逻辑创建方面,它会更加深入.(还提供了很好的参考,可以使您更加了解html,css和js的协作方式)
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)
这篇关于在网站上为文本创建放大镜的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!