ToMotion AI logo
Menu
Back to gallery

Public AI explainer video

3 Fast CSS Image Styling Wins

Want your images to look polished in CSS? Here are three fast styling wins. First: border-radius. It softens sharp corners. For a gentle round, try:...

Prompt

Source idea used to generate this video.

અંક ૧: border-radius (ગોળાકાર ખૂણા) જો તમારે ઈમેજના તીક્ષ્ણ ખૂણાઓને સોફ્ટ કે ગોળ કરવા હોય, તો આપણે border-radius વાપરીશું." CSS img { width: 250px; height: 250px; border-radius: 15px; /* ખૂણા સહેજ ગોળ થશે */ } "અને જો તમારે ઈમેજને પૂરેપૂરી Circle (ગોળ) બનાવવી હોય, તો border-radius: 50% કરી દેવાનું!" અંક ૨: box-shadow (3D શૅડો ઇફેક્ટ) "ઈમેજને બેકગ્રાઉન્ડથી અલગ પાડવા અને 3D ઇફેક્ટ આપવા માટે આપણે box-shadow વાપરીશું. આમાં આપણે X-offset, Y-offset, Blur radius અને Color નક્કી કરીએ છીએ." CSS img { box-shadow: 0px 8px 20px rgba(0, 0, 0, 0.25); } અંક ૩: object-fit: cover (ફોટો ખેંચાઈ ન જાય તે માટે) "જ્યારે આપણે ઈમેજની Width અને Height આપીએ છીએ, ત્યારે ક્યારેક ફોટો ખેંચાઈ (Stretch) જાય છે. તેને પરફેક્ટ ફિટ કરવા માટે આ પ્રોપર્ટી વાપરો:" CSS img { object-fit: cover; }

Narration

Narration used to create this video.

Video narration

Want your images to look polished in CSS? Here are three fast styling wins. First: border-radius. It softens sharp corners. For a gentle round, try: border-radius: 15px;. And if you want a perfect circle, use: border-radius: 50%—best on a square image. Second: box-shadow. It separates an image from the background and adds a subtle 3D lift. A shadow is built from X-offset, Y-offset, blur radius, and color. Example: box-shadow: 0px 8px 20px rgba(0, 0, 0, 0.25); Third: object-fit: cover. When you set both width and height, images can stretch. object-fit: cover keeps the image’s proportions, fills the box, and crops the extra instead of squishing it. That’s it: round corners, add depth, and keep images looking right.