首页 > 解决方案 > 我的 svg 轮廓不完全在 svg 边缘

问题描述

在此处输入图像描述

我希望我的尺码和位置非常干净。

我的 SVG 轮廓并不完全在它的边缘。我不能把它放在我想要的地方。

<div id="ticket-container">
  <div id="ticket">
    <object data="ticket.svg" type="image/svg+xml" id="ticket">
            x
    </object>
  </div>
</div>`
#ticket-container{
  width: 50%;
  height: 100%;
  display: inline-block ;
  float: right;
  box-sizing: border-box ;
  padding-bottom: 11px;
  position: relative;
  display: flex;
  align-items: center;
  justify-content: flex-end; 
  color: whitesmoke !important; 

}
#ticket{
  background-color: #e00808;
  width: 30%;
  height: 45%;
  position: absolute;
  display: flex;
  align-items: center;
  justify-content: center;
}
#ticket-svg{
  height: 21px;
  display: inline-block;
}

标签: htmlcssobjectsvgsize

解决方案


推荐阅读