繁体   English   中英

SVG 进入 IE11 中的下一行

[英]SVG breaks into next line in IE11

我的问题是尽管我在 SVG.

在 a-tag 上添加“display: flex”也无法正常工作 - 只是奇怪地破坏了文本

HTML:

 .m-stage-content { max-width: 420px; position: absolute; bottom: 2rem; -webkit-box-shadow: 0 4px 6px rgb(0 0 0 / 15%); box-shadow: 0 4px 6px rgb(0 0 0 / 15%); }.m-stage-txt { border-radius: 4px; padding: 1.5rem; }.m-stage.-whitebg { background: rgba(255,255,255,.9); }.c-btn-primary { background: #238900; text-align: center; font-size: .9999rem; font-weight: 300; padding: .625rem.75rem; line-height: 20px; border: 1px solid #238900; border-radius: 4px; color: #fff; }.m-stage-btn { display: inline-block; }.m-stage-btn svg { height: 12px; vertical-align: baseline; margin: 0 0 0.5rem; }.c-btn-primary-icon { fill: #fff; }
 <div class="m-stage-content -left"> <div class="m-stage-txt -whitebg"> <h1 class="m-stage-headline">Headline</h1> <span class="m-stage-description"><h3 style="margin: 0px; padding: 0px; border: 0px currentColor; border-image: none; line-height: 34px; vertical-align: baseline; font-stretch: inherit; font-variant-numeric: inherit; font-variant-east-asian: inherit;">Subline<br></h3></span> <a class="m-stage-btn c-btn-primary" href="/more"> More information <svg xmlns="http://www.w3.org/2000/svg" class="c-btn-primary-icon" fill="none" viewBox="0 0 8 16"> <path d="M 0.547594 1.13915 L 0.326625 1.36009 C 0.180188 1.50652 0.180188 1.74396 0.326625 1.89043 L 6.43578 7.99962 L 0.326625 14.1088 C 0.180188 14.2552 0.180188 14.4927 0.326625 14.6391 L 0.547594 14.8601 C 0.694031 15.0065 0.931469 15.0065 1.07791 14.8601 L 7.67325 8.26477 C 7.81969 8.11834 7.81969 7.8809 7.67325 7.73443 L 1.07791 1.13915 C 0.931469 0.99268 0.694031 0.99268 0.547594 1.13915 Z" /> </svg> </a> </div> </div>

这是它在 IE11 中的显示方式:

截图 IE11

这是它在 Chrome 中的显示方式,应该显示:

屏幕截图 Chrome

有谁知道这个问题并可以帮助我?

您是否尝试将您的高度和宽度添加到您的 xml,即需要这个,否则它将作为全角处理。 它应该看起来像这样:

        <svg xmlns="http://www.w3.org/2000/svg" height="80" width="80"  class="c-btn-primary-icon" fill="none" viewBox="0 0 8 16">
           <path d="M 0.547594 1.13915 L 0.326625 1.36009 C 0.180188 1.50652 0.180188 1.74396 0.326625 1.89043 L 6.43578 7.99962 L 0.326625 14.1088 C 0.180188 14.2552 0.180188 14.4927 0.326625 14.6391 L 0.547594 14.8601 C 0.694031 15.0065 0.931469 15.0065 1.07791 14.8601 L 7.67325 8.26477 C 7.81969 8.11834 7.81969 7.8809 7.67325 7.73443 L 1.07791 1.13915 C 0.931469 0.99268 0.694031 0.99268 0.547594 1.13915 Z" />
        </svg>

暂无
暂无

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM