如何在图像上创建图层?
如何在图像上创建图层,或在另一个图像上创建图像? 因为它不允许我这样做,只能在图像附近分层。
How can I create a Layer on an Image, or Image on another Image?
because it doesn't let me do that, only layer near the image.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
您的选择归结为两种策略:
1) 在客户端上在浏览器中合成它们,方法是将大部分透明的图像覆盖在主图像上。这可能更简单,并且需要 html 和 css 技能,但无论服务器是否运行 Asp.net,都是相同的技术。但它有一个缺点,即知道自己在做什么的人可以从覆盖层后面拉出完整的图像。这可能是也可能不是您关心的事情。
2) 在服务器上将它们合成。您可以使用变体在 .Net 中执行此操作
You choices come down to two strategies:
1) Composite them on the client, in the browser, by overlaying a mostly-transparent image over the main one. This is probably simpler, and requires html and css skills, but will be the same technique regardless of if the server running Asp.net or not. But it has the drawback that someone who knows what they are doing can pull out the complete image from behind the overlay. This may or may not be something that you care about.
2) Composite them on the server. You can do this in .Net using variations on this technique. It will use more server CPU, but only the finished image is sent to the client. It's more appropriate where the image is different for every user, or you don't want to send the image without the overlay.
您可以使用透明 png 或 gif 作为透明层,并在样式或 css 中使用position:absolute 或position:relative 将其放置在第一层上。
You could use a transparent png or gif for the transparent layer and use position:absolute or position:relative in your style or css to place it over the first layer.