0
A
回答
2
我创建这个plunkr你的问题: https://plnkr.co/edit/RPAA1JkRM6Or1pY9yMeI
.container-iphone {
width: 657px;
height: 588px;
}
.container-iphone img {
\t position: absolute;
\t z-index: 2;
}
.container-iphone .inside {
padding-top: 50px;
\t text-align: center;
transform: translate(50%,50%);
position: relative;
width: 339px;
}
<!doctype html>
<html lang="en">
<head>
<meta charset="utf-8">
<title>Iphone Mask - Jonathan Muszkat</title>
<meta name="description" content="Iphone Mask">
<meta name="author" content="Jonathan Muszkat">
<link rel="stylesheet" href="style.css">
</head>
<body>
\t <div class="container-iphone">
\t \t <img src="http://i.imgur.com/WXt6Pyu.png" />
\t \t <div class="inside">whatever whatever whatever whatever whatever whatever whatever whatever whatever<br/> whatever whatever whatever whatever whatever whatever whatever whatever whatever whatever whatever whatever whatever whatever whatever whatever whatever whatever whatever whatever whatever <div>
\t </div>
</body>
</html>
,你可以看到我修改你的iphone形象,创造div里面所以在那个div你可以pu无论你想要什么。也是SVG。
感谢, 乔纳森
+0
是的,但我不得不说我有很多这样的图像,大约有1000张照片。 – denysdovhan
+0
这不是一个问题。你可以复制这个。还有一个脚本有1000个。 –
相关问题
- 1. html5应用与svg图像和图层:性能和图层
- 2. 如何切换SVG图像
- 3. 如何填充SVG图像
- 4. 如何拉伸SVG图像?
- 5. 如何在Angular 2中注入SVG图像?
- 6. SVG中的切换图层
- 7. PDF确实有2层 - 图像层和文本层?
- 8. SVG图像vs SVG嵌入
- 9. Base64 SVG图像
- 10. iOS - 如何为图像创建图层
- 11. 如何在图像上创建图层?
- 12. 如何在图像视图中更改svg图像的xml源
- 13. 如何将响应SVG图像居中?
- 14. 如何在svg中居中图像
- 15. 如何在processing.js中旋转SVG图像
- 16. 如何用图像生成SVG qrcode?
- 17. 如何用图像替换SVG形状?
- 18. 如何创建响应SVG图像
- 19. 如何获得emdedded SVG图像
- 20. 如何将svg代码保存为.svg图像?
- 21. 如何使用独立的SVG图像创建SVG精灵?
- 22. 的jQuery插件SVG:如何显示预定义的SVG图像
- 23. 如何定位来自SVG的SVG图像<use>
- 24. 编辑SVG图像
- 25. 内联SVG图像
- 26. 显示SVG图像
- 27. SVG背景图像
- 28. SVG:伸展图像
- 29. SVG xml到图像
- 30. SVG图像约束
预计你至少尝试为自己的代码这一点。堆栈溢出不是代码写入服务。我建议你做一些[**额外的研究**](http://meta.stackoverflow.com/questions/261592/how-much-research-effort-is-expected-of-stack-overflow-users) ,无论是通过谷歌或通过搜索,尝试和。如果您仍然遇到麻烦,请返回**您的代码**并解释您尝试过的以及为什么它不起作用。 –
是的,我知道,我已经在寻找可能的解决方案。据我所知,我们不能使用'image'作为svg中的掩码,所以我要求人们不要编写解决方案,而是帮助我找到解决方法。 – denysdovhan