gpt4 book ai didi

css - 覆盖字形以使用旧时尚背景属性

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

我需要一种方法来覆盖 Bootstrap 的字形图标样式并使用传统的 CSS 背景属性而不破坏现有标记(例如 <i class="glyphicon glyphicon-comment"></i> )

这是我的尝试,但还是不行:

.glyphicon-comment:before {
content: none;
}

.glyphicon-comment {
background: transparent url('someurl') no-repeat 0 -380px;
}

编辑:

通过为 glyphicon 类指定高度和宽度来解决,如下所示:

.glyphicon {
width:14px;height:14px
}

最佳答案

这适用于 http://getbootstrap.com :

.glyphicon.glyphicon-comment:before {
content: none;
}

如果你不想保留图标的空间,你也可以试试

.glyphicon.glyphicon-comment {
display: none
}

关于css - 覆盖字形以使用旧时尚背景属性,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/21159272/

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