我创建了一个类
.image-upload .image-edit input + label:after {
content: "\f030";
font-family: 'FontAwesome';
color: #757575;
position: absolute;
top: 10px;
left: 0;
right: 0;
text-align: center;
margin: auto;
}
我需要更改相机图标(字体很棒到线条很棒)
我试过了
.image-upload .image-edit input + label:after {
content: "\";
font-family: '"Line Awesome Free"';
color: #757575;
position: absolute;
top: 10px;
left: 0;
right: 0;
text-align: center;
margin: auto;
}
但它不起作用
这是 HTML 表单
<form action=""#>
<div class="text-center">
<div class="avatar-upload">
<div class="avatar-edit">
<input name="input_file" type="file" id="profile-pic-upload" />
<label for="profile-pic-upload"></label>
</div>
</div>
</div>
</form>
最佳答案
label:after {
content: "\f030";
font-family: "Line Awesome Free";
color: #757575;
position: absolute;
top: 10px;
left: 0;
right: 0;
text-align: center;
margin: auto;
}
此代码是正确的,但您还必须添加 font-weight: 900;
关于html - 如何将字体很棒的图标更改为线条很棒的图标,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/59641441/