gpt4 book ai didi

css - 用 Bootstrap Glyphicons 替换图像

转载 作者:太空宇宙 更新时间:2023-11-04 09:33:01 26 4
gpt4 key购买 nike

我想用 bootstrap glyphicons 替换 css 中的图像

这里是我的代码:

.inputShowPwd > .showpass {

display: none;
position: absolute;
height: 24px;
width: 24px;
top: 50%;
margin-top: -12px;
right: 6px;
background:url(image/show.png) 50% 50% no-repeat;
}

这是代码的预览:preview

实际上,它有效,但我想用 bootstrap glyphicons 替换它,因为从我放大它时附加的图像显示图像变得模糊

所以我想问一下,如何在 css 中用 bootstrap glyphicons 替换图像?任何建议将不胜感激

最佳答案

这里是我的更新代码,用于替换 css 中的图像并使用很棒的字体

.inputShowPwd > .showpass {
display: none;
position: absolute;
height: 24px;
width: 24px;
top: 50%;
margin-top: -10px;
right: 2px;
}
.inputShowPwd > .showpass:after {
content:"\f06e"; /*this is unicode of eye on font awesome*/
font-family: "FontAwesome";
}

这是 preview代码的

它显示眼睛 Font Awesome 图标在我放大时不会模糊

关于css - 用 Bootstrap Glyphicons 替换图像,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/40623756/

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