Advertisement
koyuki13

Help Sauron

Feb 26th, 2020
128
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 2.51 KB | None | 0 0
  1. Partie CSS
  2.  
  3. body {
  4. font-family: 'Courier New', Courier, monospace;
  5. }
  6.  
  7. /* English : Replace the dots below by a selector targeting all the images of the page. */
  8. /* Français : Remplace les points ci-dessous par un sélecteur ciblant toutes les images de la page. */
  9.  
  10. img {
  11. width: 300px;
  12. height: 300px;
  13. border-radius: 10px; /* English : Replace with a property that makes the image borders look rounded. */
  14. /* Français : Remplace par une propriété arrondissant les angles de l'image. */
  15. }
  16.  
  17.  
  18.  
  19. /* English : Replace the dots below by a class named "hover-effect" with a :hover pseudo-class. This class has to target the first image and the last image of the page. */
  20. /* Français : Remplace les points ci-dessous par une classe "hover-effect" avec une pseudo-classe :hover. Cette classe doit cibler la première image et la troisième image de la page. */
  21.  
  22. .hover-effect:hover{
  23. opacity: 0.8; /* English : Replace with a property responsible for opacity changes. */
  24. /* Français : Remplace par une propriété modifiant l'opacité. */
  25. cursor: pointer;
  26. }
  27.  
  28. /* English : Replace the dots below by a selector targeting the second image of the page. Do not use a class or an id! */
  29. /* Français : Remplace les points ci-dessous par un sélecteur ciblant la seconde image de la page. N'utilise pas de classe ou d'id ! */
  30.  
  31. img:nth-of-type(2){
  32. filter: grayscale(100%); /* English : Replace with a property that makes the image look black & white. */
  33. /* Français : Remplace par une propriété faisant paraître l'image en noir et blanc. */
  34. }
  35.  
  36. Partie HTML
  37.  
  38. <!DOCTYPE html>
  39. <html lang="en">
  40. <head>
  41. <meta charset="UTF-8">
  42. <title>Catch'em all!</title>
  43. <link rel="stylesheet" href="style.css">
  44. </head>
  45. <body>
  46. <main>
  47. <img src="http://images.innoveduc.fr/integration_parcours/css/css_selectors_props/hobbit-house.jpg" alt="Hobbit house" class="hover-effect">
  48. <p>Photo by conner Bowe on Unsplash</p>
  49. <img src="http://images.innoveduc.fr/integration_parcours/css/css_selectors_props/hobbit-house-grass.jpg" alt="Hobbit house with grass">
  50. <p>Photo by Jeff Finley on Unsplash</p>
  51. <img src="http://images.innoveduc.fr/integration_parcours/css/css_selectors_props/hobbit-house-grey-grass.jpg" alt="Hobbit house with grey grass" class="hover-effect">
  52. <p>Photo by Tyler Lastovich on Unsplash</p>
  53. </main>
  54. </body>
  55. </html>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement