N
N
Nikita2014-02-19 12:10:44
css
Nikita, 2014-02-19 12:10:44

Diamond in CSS3: how to create a triangle for the edges?

I'm trying to create a diamond in CSS and was wondering how to create triangles for the faces? A simple way through the border will not help, because the triangles are not even, the vertex is displaced.
images?q=tbn:ANd9GcT7comWCKJVKu-39QIW64e

Answer the question

In order to leave comments, you need to log in

4 answer(s)
G
Graph, 2014-02-19
@Freeddi

Everything is in google.
https://css-tricks.com/examples/ShapesOfCSS/cssdeck.com/labs/css-diamond
_

S
Sergey Melnikov, 2014-02-19
@mlnkv

ruseller.com/lessons.php?id=1538
there is an svg, so try this.
but in general, here you can use ordinary borders

S
Sergey, 2014-02-19
Protko @Fesor

through the borders, just the borders will be different sizes. Example:
jsfiddle.net/443s8/1
and where the vertex is displaced (there is an obtuse corner), you can simply make blocks in two layers.

A
Alexander Petrov, 2014-02-19
@dzhiriki

Way through border + transform: rotate(*deg) ?

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question