gpt4 book ai didi

css - css定义中为什么icon不能显示内容

转载 作者:行者123 更新时间:2023-11-28 01:06:58 25 4
gpt4 key购买 nike

在我的元素中,我想使用一个图标,这里是html代码:

 <span class="item-title-icon"></span>

这里是图标的定义:

.item-title-icon
position: relative
left: .06rem
top: .06rem
display: inline-block
width: .36rem
height: .36rem
background-size: .4rem 3rem
background: url(http://s.qunarzz.com/piao/image/touch/sight/detail.png) 0 -.45rem no-repeat
margin-right: .1rem

运气不好,显示错了,图标不能正确显示,只显示了一部分。看起来没什么问题,谁能帮帮我?

最佳答案

您的宽度似乎太小,无法完全显示图像。

width: .36rem
height: .36rem

https://jsfiddle.net/votrq7hn/

关于css - css定义中为什么icon不能显示内容,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/52308501/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com