(已解决 - 通过codepen链接查看解决方案)我正在尝试使用SVG图像作为背景,它将始终延伸到其父div的100%.已经尝试过:
为了得到更好的理解我想要什么,请访问以下链接:
http://185.127.16.178/~amen/%D7%90%D7%95%D7%91%D7%97%D7%A0%D7%AA- %D7%9C%D7%90%D7%97%D7%A8%D7%95%D7%A0%D7%94 /
在该绿色泡沫,文本的长度可以变化,所以我需要的SVG时更多的文本伸展添加,div正在增长.
我还创造了一支小笔 -
.svg-container {
height: 400px;
width: 200px;
border: 1px solid red;
position: relative;
}
#small_bubble {
top: 0;
right: 0;
width: 100%;
height: 100%;
}
.cls-1 {
fill: transparent;
stroke: green;
stroke-miterlimit: 3;
stroke-width: 3px;
}
.e-poa {
position: absolute;
}
e-por {
position: relative;
}Run Code Online (Sandbox Code Playgroud)
<div class="svg-container">
<svg id="small_bubble" class="e-poa" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 311.92 272.85" …Run Code Online (Sandbox Code Playgroud)