0
我有SVG三角形我穿上段的頂部:量表SVG圖像 - 視框
position: relative;
top: 0;
left: 0;
我的SVG:
<svg version="1.1" class="triangle_top" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" x="0px" y="0px"
width="480px" height="155.5px" viewBox="0 0 480 155.5" style="enable-background:new 0 0 480 155.5;" xml:space="preserve">
<g>
<polygon style="fill:#fd7013;" points="480,155.5 0.5,70.9 0.5,0.3 324.2,0.3 "/>
</g>
<rect x="35.7" y="21.5" style="fill:none;" width="289.1" height="28.2"/>
<text transform="matrix(1 0 0 1 35.7373 46.6423)" style="fill:#fff; font-family:'Lato'; font-size:33.8486; font-weight: bold;">title</text>
</svg>
當屏幕小於< 450像素我改變寬度(媒體查詢):
width: 100%;
但我的SVG是不是在最前面:0 :( 屏幕:http://prntscr.com/aa27iy
如何使我的svg響應和永遠在上面:0?
當我將高度:100%,絕對位置不工作,我的SVG跳轉到其他部分(上) – Dominik
@Dominik哪個位置絕對?我想,你使用相對位置 –
@Dominik如果你會使用'postion:absolute',那麼不要使用'height:100%;'並且使用像'height:20vh;' –