Advertisement
StessieFlt

05 - CSS : sélecteurs et propriétés

Oct 10th, 2019
132
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
CSS 1.33 KB | None | 0 0
  1. index.html
  2.  
  3. <!DOCTYPE html>
  4. <html lang="en">
  5.     <head>
  6.         <meta charset="UTF-8">
  7.         <title>Catch'em all!</title>
  8.        <link rel="stylesheet" href="style.css">
  9.    </head>
  10.    <body>
  11.        <main>
  12.            <img src="http://images.innoveduc.fr/integration_parcours/css/css_selectors_props/hobbit-house.jpg" alt="Hobbit house">
  13.            <p>Photo by conner Bowe on Unsplash</p>
  14.            <img src="http://images.innoveduc.fr/integration_parcours/css/css_selectors_props/hobbit-house-grass.jpg" alt="Hobbit house with grass">
  15.            <p>Photo by Jeff Finley on Unsplash</p>
  16.            <img src="http://images.innoveduc.fr/integration_parcours/css/css_selectors_props/hobbit-house-grey-grass.jpg" alt="Hobbit house with grey grass">
  17.            <p>Photo by Tyler Lastovich on Unsplash</p>
  18.        </main>
  19.    </body>
  20. </html>
  21.  
  22. style.css
  23.  
  24. body{
  25.   font-family: 'Courier New', Courier, monospace;
  26. }
  27.  
  28. .section img{
  29.    width: 300 px;
  30.    height: 300 px;
  31.    border-radius: 30 px; /* propriété qui arrondie les angles d'une image*/
  32. }
  33.  
  34. .hover-effect img:hover{
  35.     opacity: 0,8; /* propriété qui permet de modifier l'opacité*/
  36.     cursor: pointer;
  37. }
  38.  
  39. .img:nth-child(3){
  40.     filter: grayscale(1); /* propriété qui permettent de mettre une image en noir et blanc */
  41.     -webkit-filter: grayscale(1);
  42. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement