我需要在图像中写入透明(而不是“200”)的任何文本。而不是“200”我需要改变这个文本。有可能???
HTML:
<div class="blocks">
<div class="trans-200">200</div>
</div>
答案 0 :(得分:2)
除非您使用图像,否则无法执行此跨浏览器。 webkit有可能:
background: url(images/wood_texture.jpg) repeat;
-webkit-text-fill-color: transparent;
-webkit-background-clip: text;
http://www.silenceit.ca/2011/03/11/css-gradients-and-webkit-image-masks-on-text/