我如何正确地定位我的SVG元素,以便它即使在尺寸上
因此,我的问题形象。我有两个SVG文件,无论我如何调整窗口大小,我都希望它们粘在底部,如果我将其调整到移动配置大小,我希望它们堆放在每个人的顶部
这是我的CSS,但是在我调整大小之后,它们甚至不在底部。我有两种不同颜色的背景分开
* {
box-sizing: border-box;
margin: 0;
padding: 0;
text-decoration: none;
}
.column1 {
height: 100vh;
background-color: #679289;
}
.column2 {
height: 100vh;
background-color: #f4c095;
}
.svg1 {
overflow: visible;
transform: translate(0px, 68px);
}
.svg1 {
overflow: visible;
transform: translate(0px, 166px);
}
,也指出SVG的尺寸不是相同的
So heres the image of my problem. I have two SVG files, and i want them to sticky to the bottom no matter how i resize my window, and if I resize it to a mobile configuration i want them to stack on top of eachoother
This is my CSS, but after i resize they dont stay even on the bottom. I have the background split with two different colors
* {
box-sizing: border-box;
margin: 0;
padding: 0;
text-decoration: none;
}
.column1 {
height: 100vh;
background-color: #679289;
}
.column2 {
height: 100vh;
background-color: #f4c095;
}
.svg1 {
overflow: visible;
transform: translate(0px, 68px);
}
.svg1 {
overflow: visible;
transform: translate(0px, 166px);
}
Also noting the SVGs are not the same size
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
尝试在DIV中包含元素并使用Flex-Box。您可能必须针对其他布局元素进行调整,但是原理应该相同。
https://codepen.io/jonshipman/pen/pen/pen/pen/pen/zyrokjx
Try containing the elements in divs and using flex-box. You might have to adjust it for other layout elements, but the principle should be the same.
https://codepen.io/jonshipman/pen/zYRoKjX