0
votes

Obtenir une erreur lors de l'emballage d'un élément à l'intérieur d'un nom de classe dans CSS

Je reçois des erreurs tout en écrivant CSS comme:

.text {
    margin-left: 20px;
    color: #fff;
    display: none;
    transition: all 0.5s ease-in-out;
    transition-delay: 0.3s;

    a, a:visited {
        font-size: 36px;
        color: #fff;
        text-decoration: none;  
        font-weight: bold;
        display: block;
    }
}


0 commentaires

3 Réponses :


0
votes

Si vous écrivez Vanilla CSS, vous devez le faire comme ceci:

.text {
  margin-left: 20px;
  color: #fff;
  display: none;
  transition: all 0.5s ease-in-out;
  transition-delay: 0.3s;
}

.text a, .text a:visited {
  font-size: 36px;
  color: #fff;
  text-decoration: none;  
  font-weight: bold;
  display: block;
}


0 commentaires

3
votes

Vous devez l'écrire comme ceci:

.text {
    margin-left: 20px;
    color: #fff;
    display: none;
    transition: all 0.5s ease-in-out;
    transition-delay: 0.3s;
}
.text a, .text a:visited {
        font-size: 36px;
        color: #fff;
        text-decoration: none;  
        font-weight: bold;
        display: block;
    }


1 commentaires

Enfin quelqu'un à mentionner Sass 👍



0
votes

Si la classe texte est le parent de la balise A , alors vous devez écrire dans ce format: xxx

si Vous souhaitez appliquer les règles pour toutes les balises A sur votre page, puis le VAN doit écrire les règles de ce format: xxx


0 commentaires