Trying to add an image inside a CSS Grid

安稳与你 提交于 2019-12-02 09:48:02

You can try to use some gradient in case you cannot change the background image

.wrap {
  position: relative;
  width: 600px;
  height: 600px;
  margin-top: 45px;
  border:4px solid red;
  background-color:red;
  overflow: hidden;
  border-radius: 25px;
  background: 
    linear-gradient(red,red) calc(100%/3 - 1px)   0% /4px 100%,
    linear-gradient(red,red) calc(2*100%/3 + 1px) 0% /4px 100%,
    linear-gradient(red,red) 0% calc(100%/3 - 1px)   /100% 4px,
    linear-gradient(red,red) 0% calc(2*100%/3 + 1px) /100% 4px,
    url("https://i.imgur.com/1TbGgqz.png") no-repeat 0 -600px;
  background-repeat:no-repeat;
}
<div class="wrap">
  
</div>
标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!