Advertisement
Kastus

The CSS: selectors and properties WCS Quest

Oct 5th, 2022
1,354
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
CSS 0.95 KB | None | 0 0
  1. body {
  2.     font-family: 'Courier New', Courier, monospace;
  3. }
  4.  
  5. /* English : Replace the dots below by a selector targeting all the images of the page. */
  6.  
  7.  
  8. img {
  9.     width: 300px;
  10.     height: 300px;
  11.     border-radius: 25px;      /* English : Replace with a property that makes the image borders look rounded. */
  12.            
  13. }
  14.  
  15. /* 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. */
  16.  
  17.  
  18. img:hover:nth-of-type(odd) {
  19.     opacity: 0.8;      /* English : Replace with a property responsible for opacity changes. */
  20.                    
  21.     cursor: pointer;
  22. }
  23.  
  24. /* English : Replace the dots below by a selector targeting the second image of the page. Do not use a class or an id! */
  25.  
  26.  
  27. img:nth-of-type(2) {
  28.     filter: grayscale(100);  /* English : Replace with a property that makes the image look black & white. */
  29.                
  30. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement