CSS Assignment – 4
Basic Questions
- Create a grid container with display: grid; and two child boxes.
- Define a grid with 2 columns and 2 rows using grid-template-columns and grid-template-rows.
- Create a grid with 3 equal columns (1fr 1fr 1fr).
- Add spacing between grid items using grid-gap: 10px;.
- Align grid items to the center using justify-items: center;.
- Place one item into the second column with grid-column-start and grid-column-end.
- Make a div semi-transparent using opacity: 0.5;.
- Add a simple box shadow behind a card.
- Apply text-shadow to a heading.
- Create a linear gradient background from blue to green.
- Apply a radial gradient to a div background.
- Set a blur filter on an image using filter: blur(5px);.
- Adjust brightness of an image with filter: brightness(70%);.
- Create a circular image using clip-path: circle().
- Apply a polygonal clip-path (clip-path: polygon(…)) to crop a div.
- Add a smooth hover color change for a button using transition: 0.5s;.
- Apply transition-timing-function: ease-in; to a hover effect.
- Create a text block that fades in using opacity transition.
- Animate a box to move left to right using @keyframes.
- Create a hover effect that enlarges a card slightly (transform: scale(1.05)).
Intermediate Questions
- Create a 3×3 grid layout and place 9 boxes inside it.
- Build a layout where the first row takes 100px height and the second auto-adjusts.
- Create a grid layout with a sidebar (1fr) and content (3fr).
- Use grid-template-areas to build a layout with header, sidebar, and footer.
- Make items span across two columns using grid-column: span 2;.
- Align all items at the bottom of their grid cells.
- Make the grid responsive by using repeat(auto-fill, minmax(150px, 1fr)).
- Apply multiple box shadows to create a glowing button.
- Use a conic gradient as a background.
- Add an image with a grayscale filter (filter: grayscale(100%)).
- Apply a hover effect that adds drop-shadow to an image.
- Stack text with two different text-shadow values for a 3D effect.
- Create a gradient overlay (linear gradient + background-image together).
- Create a star-shaped div using clip-path: polygon(…).
- Apply an image mask that hides half the image using clip-path: ellipse().
- Animate a bouncing ball with @keyframes (transform: translateY).
- Create a fade-in effect for text on page load.
- Animate a rotating loader using @keyframes and infinite rotation.
- Make a button change background-color smoothly with transition.
- Delay an animation by 2 seconds with animation-delay.
Advanced Questions
- Create a full 2D dashboard layout using grid-template-areas (header / sidebar / content / footer).
- Build a responsive image gallery with auto-adjusting columns using auto-fit and minmax().
- Design a layout where the sidebar is sticky using Grid + position: sticky.
- Mix Grid and Flexbox: Use Grid for overall layout, and Flexbox for navigation inside the header.
- Create a radial gradient background animation using CSS @keyframes.
- Build a Neumorphism-style card with subtle shadows and gradients.
- Create a circular profile image with a gradient border using clip-path and linear-gradient.
- Animate a progress bar filling up using @keyframes and width property.
- Create a text typing effect using @keyframes and ch steps().
- Build a hover effect where an image darkens and text fades in over it using transitions + opacity.