28106 sujets

CSS et mise en forme, CSS3

Bonjour,

J'ai réalisé un site pour une société de nettoyage (cf https://www.france-clean.fr/ et j'aimerais ajouter une animation sur le menu pour créer une barre qui serait modifier par le hover

@import url(https://fonts.googleapis.com/css?family=Raleway:400,500,800);
.snip1226 {
  font-family: 'Raleway', Arial, sans-serif;
  text-align: center;
  text-transform: uppercase;
  font-weight: 500;
}
.snip1226 * {
  box-sizing: border-box;
  -webkit-transition: all 0.35s ease;
  transition: all 0.35s ease;
}
.snip1226 li {
  display: inline-block;
  list-style: outside none none;
  margin: 0 1.5em;
  overflow: hidden;
}
.snip1226 a {
  padding: 0.3em 0;
  color: rgba(255, 255, 255, 0.5);
  position: relative;
  display: inline-block;
  letter-spacing: 1px;
  margin: 0;
  text-decoration: none;
}
.snip1226 a:before,
.snip1226 a:after {
  position: absolute;
  -webkit-transition: all 0.35s ease;
  transition: all 0.35s ease;
}
.snip1226 a:before {
  bottom: 100%;
  display: block;
  height: 3px;
  width: 100%;
  content: "";
  background-color: #e67e22;
}
.snip1226 a:after {
  padding: 0.3em 0;
  position: absolute;
  bottom: 100%;
  left: 0;
  content: attr(data-hover);
  color: white;
  white-space: nowrap;
}
.snip1226 li:hover a,
.snip1226 .current a {
  transform: translateY(100%);
}
/* Demo purposes only */
body {
  background-color: #212121;
}


Voila ce que j'ai indiqué mais cela ne fonctionne pas Smiley eek
Modérateur
Bonjour,

Il n'y a pas d'élément ayant la classe snip1226 dans ton code html.

Ça pourrait expliquer ton problème.

Amicalement,