当我在其他设备和浏览器上进行测试时,我的蓝色背景色(#3838be)显示在动画svg的后面,但是在safari移动版上,背景变成白色。
我尝试将svg包含在具有我的背景色的div中,但是它不起作用。我试图重新排列我的svg在代码中的放置位置,但是它也不起作用
body {
background-image: linear-gradient(#3838be, #5a5af2);
background-repeat:no-repeat;
background-attachment:fixed;
margin: 0;
padding: 0;
width: 100vw;
height: 100vh;
position: relative;
align-items: center;
overflow-x:hidden;
font-family: europa, sans-serif;
}
.blob {
position: absolute;
top: 0;
left: 0;
fill: #a5b11e;
width: 50vmax;
z-index: -1;
animation: move 10s ease-in-out infinite;
transform-origin: 50% 50%;
height: 100vh;
}
<div class="blob">
<svg xmlns:xlink="http://www.w3.org/1999/xlink" version="1.1" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 310 350">
<path d="M156.4,339.5c31.8-2.5,59.4-26.8,80.2-48.5c28.3-29.5,40.5-47,56.1-85.1c14-34.3,20.7-75.6,2.3-111 c-18.1-34.8-55.7-58-90.4-72.3c-11.7-4.8-24.1-8.8-36.8-11.5l-0.9-0.9l-0.6,0.6c-27.7-5.8-56.6-6-82.4,3c-38.8,13.6-64,48.8-66.8,90.3c-3,43.9,17.8,88.3,33.7,128.8c5.3,13.5,10.4,27.1,14.9,40.9C77.5,309.9,111,343,156.4,339.5z"/>
</svg>
</div>
Here is what it looks like in mobile.
biancat.co是我的网站,如果您想查看它的外观