Bonjour,
J'ai essayé de chercher sur internet un solution pour afficher un lien sur image survole qui contient un texte, mais je n'ai pas pu réussi. En fait j'ai réussi d'afficher uniquement l'image survol en texte mais sans lien.
et voici le code que j'ai utilisé mais qui n' a pas marché.
Pour Css j'ai mis
Code css : Sélectionner tout - Visualiser dans une fenêtre à part
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31 figure { position: relative; display: inline-block; overflow: hidden; margin: 0; } img, figcaption { transition: all .25s ease; } img { display: block; } figcaption { position: absolute; top: 0; right: 0; bottom: 0; left: 0; padding: .5em; background: #000; background: rgba(0, 0, 0, .75); color: #fff; opacity: 0; } figure:hover img { transform: scale(1.1); } figure:hover figcaption { opacity: 1; } }
Et pour html j'ai mis
Code HTML : Sélectionner tout - Visualiser dans une fenêtre à part
1
2
3
4
5
6
7
8 <figure> <a href="https://www.amazon.com/gp/product/B01HVF2SPG/ref=as_li_tl?ie=UTF8&camp=1789&creative=9325&creativeASIN=B01HVF2SPG&linkCode=as2&tag=amazon0440-20&linkId=e0a4d4965709957c26e630f3c08d3e84" target="_blank" rel="nofollow"> <figure> <img src="//ws-na.amazon-adsystem.com/widgets/q?_encoding=UTF8&MarketPlace=US&ASIN=B01HVF2SPG&ServiceVersion=20070822&ID=AsinImage&WS=1&Format=_SL160_&tag=amazon0440-20" border="0" /></a><img style="border: none !important; margin: 0px !important;" src="//ir-na.amazon-adsystem.com/e/ir?t=amazon0440-20&l=am2&o=1&a=B01HVF2SPG" alt="Nagarmotha - Cyperus Rotundus - 50 Grams" width="1" height="1" border="0" /> <figcaption>Get the product</figcaption> </figure>
Merci de m'aider pour résoudre ce problème.
Partager