Sto usando bootstrap e Font Awesome. In una classe css personalizzata su cui sto lavorando ho provato ad includere le icone Font Awesome invece di usare le immagini. Ecco il mio codice prima di Font Awesome.come usare il font fantastico nel proprio css?
.data .close {
display: block;
float: right;
width: 30px;
height: 30px;
background: url(../img/close.png) top right no-repeat;
text-align: right;
outline: none;
filter: progid:DXImageTransform.Microsoft.Alpha(Opacity=70);
opacity: 0.7;
}
.next {
right: 0;
float: right;
}
.next:hover {
background: url(../img/next.png) right 48% no-repeat;
}
Ecco il mio codice utilizzando Font Awesome, che ovviamente non funziona. Le icone non mostrano. Qualche idea su cosa sto facendo male?
.data .close {
display: block;
float: right;
width: 30px;
height: 30px;
font-family: FontAwesome
content: "\f00d";
text-align: right;
outline: none;
filter: progid:DXImageTransform.Microsoft.Alpha(Opacity=70);
opacity: 0.7;
}
.next {
right: 0;
float: right;
}
.next:hover {
font-family: FontAwesome
content: "\f054";
}
html intestazione
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8" />
<title>test</title>
<link rel="stylesheet" href="./font-awesome/css/font-awesome.css">
</head>
....
....
here is a fiddle of what i'm working on.
dove hai definito 'FontAwesome'? Puoi mostrare anche il tuo capo HTML? – Raptor
@ShivanRaptor domanda aggiornata – user2636556