-
Hajipur, Bihar, 844101
Hajipur, Bihar, 844101
CSS Basics
CSS Styling Properties
CSS Box Model
CSS Margin
CSS Padding
CSS Borders
CSS Outline
CSS Height/Width
CSS Max-width
CSS Display
CSS Position
CSS Z-index
CSS Overflow
CSS Float
CSS Inline-block
CSS Align
CSS Box Sizing
CSS Text
CSS Fonts
CSS Icons
CSS Text Effects
CSS Web Fonts
CSS Colors
CSS Backgrounds
CSS Color Keywords
CSS Gradients
CSS Shadows
CSS Links
CSS Lists
CSS Tables
CSS Advanced Selectors & Features
CSS Combinators
CSS Pseudo-classes
CSS Pseudo-elements
CSS Attribute Selectors
CSS Specificity
CSS !important
CSS Units
CSS Variables
CSS @property
CSS Math Functions
CSS Media and Image Styling
CSS Image Styling
CSS Image Centering
CSS Image Filters
CSS Image Shapes
CSS object-fit
CSS object-position
CSS Masking
CSS Layout Techniques
CSS Website Layout
CSS Navigation Bar
CSS Dropdowns
CSS Image Gallery
CSS Counters
CSS Pagination
CSS Multiple Columns
CSS User Interface
CSS Flexbox
CSS Grid
CSS Responsive Design (RWD)
CSS Image Shapes allow you to define the visual shape and clipping of images beyond the default rectangle. You can create circles, ellipses, polygons, or even custom shapes to make layouts more creative and engaging.
border-radius
for Circles and Rounded Shapesimg.circle {
border-radius: 50%;
}
This makes the image perfectly circular if it’s square or rounded if rectangular.
clip-path
for Custom ShapesThe clip-path
property allows complex shapes like polygons, circles, and ellipses.
img.polygon {
clip-path: polygon(50% 0%, 0% 100%, 100% 100%);
}
This clips the image into a triangle.
shape-outside
for Text Wrappingshape-outside
controls how text wraps around a floated image.
img.float-shape {
float: left;
shape-outside: circle(50%);
width: 200px;
height: 200px;
clip-path: circle(50%);
margin-right: 20px;
}
Text wraps around the circular image shape.
You can define SVG shapes and reference them in CSS.
img {
clip-path: url(#my-clip);
}
This requires inline SVG in HTML.
Q1. Make an image perfectly circular using border-radius
.
Q2. Clip an image into a triangle using clip-path: polygon()
.
Q3. Create an elliptical image shape using clip-path: ellipse()
.
Q4. Wrap text around a circular image using shape-outside
.
Q5. Clip an image into a star shape using clip-path
.
Q6. Use clip-path
to create a hexagon image shape.
Q7. Create an image with rounded corners of 25px radius.
Q8. Float an image with shape-outside: inset()
.
Q9. Create an oval profile picture using border-radius
and clip-path
.
Q10. Use SVG clip path to create a heart-shaped image.
CSS Basics
CSS Styling Properties
CSS Box Model
CSS Margin
CSS Padding
CSS Borders
CSS Outline
CSS Height/Width
CSS Max-width
CSS Display
CSS Position
CSS Z-index
CSS Overflow
CSS Float
CSS Inline-block
CSS Align
CSS Box Sizing
CSS Text
CSS Fonts
CSS Icons
CSS Text Effects
CSS Web Fonts
CSS Colors
CSS Backgrounds
CSS Color Keywords
CSS Gradients
CSS Shadows
CSS Links
CSS Lists
CSS Tables
CSS Advanced Selectors & Features
CSS Combinators
CSS Pseudo-classes
CSS Pseudo-elements
CSS Attribute Selectors
CSS Specificity
CSS !important
CSS Units
CSS Variables
CSS @property
CSS Math Functions
CSS Media and Image Styling
CSS Image Styling
CSS Image Centering
CSS Image Filters
CSS Image Shapes
CSS object-fit
CSS object-position
CSS Masking
CSS Layout Techniques
CSS Website Layout
CSS Navigation Bar
CSS Dropdowns
CSS Image Gallery
CSS Counters
CSS Pagination
CSS Multiple Columns
CSS User Interface
CSS Flexbox
CSS Grid
CSS Responsive Design (RWD)