html css hexagon with image inside

0 votes
Is it possible to put an image inside a hexagonal shape? In HTML, I'm used to hexagonal shaped cells, but I couldn't get one to fill with a (background?) image.
Jun 2 in CSS by Edureka
• 7,940 points
30 views

1 answer to this question.

0 votes

The CSS3 clip-path feature is a novel and simple solution.
The CSS below will display a rectangular element in hexagon shape:

div.hexagon {
  clip-path: polygon(50% 0, 100% 25%, 100% 75%, 50% 100%, 0 75%, 0 25%);
}
answered Jun 10 by Edureka
• 8,460 points

Related Questions In CSS

0 votes
0 answers
0 votes
1 answer

How to hide image broken Icon using only CSS/HTML?

Because CSS/HTML has no means of knowing ...READ MORE

answered May 31 in CSS by Edureka
• 8,460 points
14 views
0 votes
1 answer

CSS Border on PNG image with transparent parts

 There is a way to accomplish this ...READ MORE

answered Jun 13 in CSS by Edureka
• 8,460 points
25 views
0 votes
1 answer

Transparent Box with HTML/CSS?

HOpe this helps you. HTML: <img src="http://lorempixel.com/400/200" /> <div class="box-transparent"> ...READ MORE

answered Jun 13 in CSS by Edureka
• 8,460 points
9 views
0 votes
1 answer

Double arc shape with CSS jquery or javascript

But for this shape I would use ...READ MORE

answered Jun 14 in JQuery by gaurav
• 12,980 points
7 views
0 votes
2 answers

Define a SQL query? What is the difference between SELECT and UPDATE Query? How do you use SQL in SAS?

HI.. SQL is Structured Query Language, which is ...READ MORE

answered Aug 8, 2020 in PHP by anonymous
4,471 views
0 votes
1 answer

Using/Handling colon inside a JSF generated HTML element ID in CSS selector

Yes, you can.  Just Backslash (\) the colon.  Like ...READ MORE

answered Nov 14, 2018 in Others by DataKing99
• 8,240 points
1,650 views
0 votes
1 answer

What is a css selector and where is it used?

CSS Selector is a combination of element ...READ MORE

answered Nov 21, 2018 in Data Analytics by Kalgi
• 52,350 points
266 views
0 votes
1 answer

Is there any way to colorize a white PNG image with CSS only?

Filters can be used with -webkit-filter and ...READ MORE

answered May 27 in CSS by Edureka
• 8,460 points
24 views
0 votes
1 answer

How to build a special polygon (a kite shape) with HTML & CSS only?

I made two divs, one for Arc ...READ MORE

answered May 28 in CSS by Edureka
• 8,460 points
24 views
webinar REGISTER FOR FREE WEBINAR X
Send OTP
REGISTER NOW
webinar_success Thank you for registering Join Edureka Meetup community for 100+ Free Webinars each month JOIN MEETUP GROUP