CSS3 Shapes - What's possible? [closed] - css

Closed. This question needs to be more focused. It is not currently accepting answers.
Want to improve this question? Update the question so it focuses on one problem only by editing this post.
Closed 5 years ago.
Improve this question
I'm looking at only latest gen browsers:
IE9 (haven't really looked into this once much)
FF4
Chrome10
Safari5
iOS 3.4
Opera?
I know I can get squares and rectangles easy, circles and ellipsis with rounded borders (circles: W=H, ellipsis: W!=H). I know I can get slopes with border settings. I know how to get 1/2 and 1/4 circles, but is it possible to get:
Pie wedge (any size, at any location in the circle? ie. a 18% wedge, 20% off the horizontal)
Trapezoids, octagon, pentagon, hexagon
Stars (n pointed stars)
Any of the individual shapes in this that aren't already mentioned
I'm looking for CSS + DIV options, not <canvas> options. I'm also looking for options that use the least amount of nested divs. Here is an example that shows several shapes in one example...

Check out this page for some examples: http://css-tricks.com/examples/ShapesOfCSS/. The examples use only a single HTML element, so more would be possible with added complexity.

Related

Display only intersecting elements in CSS [closed]

Closed. This question needs to be more focused. It is not currently accepting answers.
Want to improve this question? Update the question so it focuses on one problem only by editing this post.
Closed 8 months ago.
Improve this question
Is there a CSS way to display only intersecting elements on the screen?
Take a look at this layout, it has 4 pseudo-elements, white semi-transparent circles located in the top corners of each square. The circle in the center is a brighter color, because there are 2 semi-transparent circles in that place, they overlap each other.
The effect I'm trying to achieve is that the side circles are invisible, and only the ones that overlap each other are displayed. But it turned out to be not easy.
There are mask, mask-composite CSS properties that do something like this, but I can't get them to work.
mix-blend-mode didn't help either.
Does anyone have any ideas how this effect could be achieved?

SVG Circle vs HTML border-radius 50% [closed]

Closed. This question is opinion-based. It is not currently accepting answers.
Want to improve this question? Update the question so it can be answered with facts and citations by editing this post.
Closed 9 years ago.
Improve this question
I am writing a mobile/web app which has coloured clickable and movable circles.
I am aware of the fact that I can draw them in two ways:
A div using border-radius
A <circle> in a <svg>
Now considering the fact that with svg I can take advantage of doing cool animations, why one over the other?
It seems to depend on what you're going to do with the circles.
If they're just buttons for a link, stick with a div, But if you're going to do all sorts of animation or create a game, I might go with SVG as it's more flexible but not supported by some old or mobile browsers.
I will update this answer with more info if you answer my question comment.

Distort image in css3 of 4 corners [closed]

Closed. This question needs to be more focused. It is not currently accepting answers.
Want to improve this question? Update the question so it focuses on one problem only by editing this post.
Closed 5 years ago.
Improve this question
I look 1 item for learning, fun. I would like have the same effect in CSS3 as in flash. http://www.rubenswieringa.com/code/as3/flex/DistortImage/
When I look in internet examples, I found only skew or rotate. I would like to have option distort image of corner image.
It's not trivial to do that – there are at least 3 options though. I'm not backing them up with a how to as that's hard and much longer than would fit here. (plus would take hours without stumbling across a library to do it)
Use canvas. Split the image into bits and draw them in the right place. You could either use the 2D or 3D (WebGL) context depending on what you are doing.
Use CSS 3D transforms. Make lots of divs, set the image to be the background image with the offsets to make it look like one image. Position them using 3D transforms to have the effect required.
Use a custom shader (only in super new browsers). http://html.adobe.com/webstandards/csscustomfilters/cssfilterlab/ has some examples of similar things.
In short, there isn't a simple way at all.
Actually, there is a rather simple way.
Distort.js

How to make this shape with css? [closed]

Closed. This question is off-topic. It is not currently accepting answers.
Want to improve this question? Update the question so it's on-topic for Stack Overflow.
Closed 11 years ago.
Improve this question
Please check out this image:
Look at the part that says 'keyboard'
I want that shape but facing the other way (right) and not curved.
I know this is a pentagon but its not the standard type so its hard to find the name or type of this shape to learn how to make it in css. Any ideas on how to make it!?!?
Thanks guys,
James
It's a rounded rectangle and a triangle (or a rotated square). To make it in "CSS" would require some hacks. I suggest you use a background image.
Mimicking the iPhone design purely in CSS is nearly impossible. However:
I found iWebKit, written by a guy who spent a lot of time on just that task. He did the navigation buttons with border images.
You can take a look at it at http://snippetspace.com/ . It's free to download, I think.
Looking at the demo code, you can easily see how the buttons work.
iWebKit is only for webkit browsers, but it does not take a lot of work to adapt to other browsers (just add -moz or -o lines where it says -webkit in the CSS).

Have you ever used these css properties? [closed]

Closed. This question needs to be more focused. It is not currently accepting answers.
Want to improve this question? Update the question so it focuses on one problem only by editing this post.
Closed 9 years ago.
Improve this question
In what cases these are useful?
table-layout
font-stretch
font-size-adjust
orphans and widows
marks
clip
orphans and widows are used commonly in print to avoid a single line at the bottom or top of a page.
More info can be found here just do a quick search
http://www.w3schools.com/Css/pr_tab_table-layout.asp
I use table-layout: fixed a fair amount, but the others not so much. I've found that table-layout: fixed, along with <col> tags will speed up the rendering of a page with a very large table because the browser doesn't need to process the contents of all data in the table to calculate column sizes. It is also useful to have two tables with columns that align perfectly.
Clip looks like it could be useful, but I haven't used it before. A good article on clip is here:
http://www.ibloomstudios.com/articles/misunderstood_css_clip/
Orphans, widows, and marks are useful in print stylesheets I believe. And the font ones are for scaling height/width of fonts. I'm not sure how supported any of those are, but table-layout is well supported.

Resources