How do I create a teardrop in HTML?

SVG approach: You can achieve the double curve easily with an inline SVG and the <path/> element instead of the <polygon/> element which doesn’t allow curved shapes. The following example uses the <path/> element with: 2 quadratic bezier curve commands for the 2 top curves (lines beginning with Q) 1 arc command for the big … Read more

Creating an Isoceles Trapezoid shape

This shape (an Isoceles Trapezoid) can be easily made using CSS3 by rotating a div with a bit of perspective. Explanation The shape is achieved by rotating an absolutely positioned pseudo-element (.container:after) along the x-axis with a perspective. We are not rotating the actual container div because it would cause the link (and any other) … Read more

Responsive CSS Circles

You don’t need @media queries for this. This is my try, pure CSS: .x1 { overflow:hidden; } .x1 .x2 { display:block; float:left; padding: 12.5%; width:auto; height:auto; border-radius:50%; -moz-border-radius:50%; -webkit-border-radius:50%; -khtml-border-radius: 50%; background:#eee; text-align:center; position: relative; } .x1 .x2 span { position: absolute; width: 100%; left: 0; top: 48%; line-height: 1em; height: 1em; font-size: 100%; overflow: … Read more

Filling water animation

Here are four different versions to supplement @misterManSam’s brilliant answer. 1. With Easing Explanation If you filled up a circular bowl full of liquid, it would fill faster at the bottom and top than it would in the middle (because there is more area to cover in the wider middle section). So, with that crude … Read more

Add outward curving border to elements like this: ◝◟___◞◜

From the top of my head: draw bottom half border on the element and draw top-left and top-right borders on positioned pseudo elements. /* using 4px border, 1em border radius, 1em padding */ nav ul { font: medium sans-serif; text-align: center; padding: 0; list-style-type: none; border-top: 4px solid; } nav li { display: inline-block; border-left: … Read more

Border within border CSS

When the main triangle or arrow is itself created using the CSS borders, it is impossible to add another border to it without using extra elements. The below are a few options. Option 1: Using a bigger size pseudo-element and positioning it behind the parent to produce a border-effect. .arrow-down { position: relative; width: 0; … Read more

tech