I am working on a project where I want to create a diagonal div using CSS like in this image:
You can use the css "clip path". It's pretty simple to understand.
#shape {
-webkit-clip-path: polygon(0 55%, 100% 0%, 100% 100%, 0% 100%);
clip-path: polygon(0 55%, 100% 0%, 100% 100%, 0% 100%);
width:200px;
height:200px;
background-color:black;
}
<div id='shape'></div>
.myDiv {
width: 400px;
height: 400px;
border: 1px solid #000;
background-image: url('https://pbs.twimg.com/profile_images/739247958340698114/fVKY9fOv.jpg');
position: absolute;
overflow: hidden;
}
.myDiv:after {
content: '';
position: absolute;
z-index: 4;
width: 0;
height: 0;
border-bottom: 800px solid red;
border-left: 800px solid transparent;
top: -40%;
left: -50%;
-ms-transform: rotate(30deg); /* IE 9 */
-webkit-transform: rotate(30deg); /* Chrome, Safari, Opera */
transform: rotate(30deg);
}
p {
position: relative;
top: 70%;
z-index: 5;
font-size: 35px;
text-align: center;
}
<div class="myDiv">
<p>Hello World!</p>
</div>
Using Bootstrap and Transition Skew CSS Property https://jsfiddle.net/oocputgz/24/
<div class="container">
<div class="row">
<div class="col-md-4">
<div class="blog-post-image">
<img src="https://i.imgsafe.org/20ff17cabf.jpg" class="img-responsive center-block" />
</div>
<div class="post-detail_container">
<div class="sperator"></div>
<div class="post-content">
<h3 class="post-title">
Hello World
</h3>
</div>
</div>
</div>
</div>
</div>
CSS Styling:
.post-detail_container
{
position:relative;
}
#blog-items .item
{
padding:0px 15px;
}
.sperator
{
position: absolute;
top: 0;
width: 100%;
height: 100px;
-webkit-transform-origin: 0 0;
-moz-transform-origin: 0 0;
-ms-transform-origin: 0 0;
-o-transform-origin: 0 0;
transform-origin: 0 0;
-webkit-transform: skew(0, -7deg);
-moz-transform: skew(0, -7deg);
-ms-transform: skew(0, -7deg);
-o-transform: skew(0, -7deg);
transform: skew(0, -7deg);
background: red;
}
.post-content
{
background-color:red;
padding:15px 15px;
min-height: 300px;
}
.post-title
{
font-size: 40px;
line-height: 24px;
margin-bottom: 2px;
color: #fff;
text-align: center;
margin-top: 88px;
}
Related
So I have a rotating pyramid which has text and a button on each face, but the buttons are unresponsive due to overlapping divs.
Is there any way to make the buttons clickable in the rotating pyramid ?
-sorry for the ugly code, it's only a prototype.
body {
padding-top: 230px;
}
.tetra {
position: relative;
transform-origin: 50% 56%;
width: 700px;
padding-bottom: 606.21px;
/* height of equilateral triangle = sin60° * width */
margin: 0 auto;
transform-style: preserve-3d;
transition: transform 1s;
}
.tetra div {
display: block;
position: absolute;
top: 0;
left: 0;
width: 100%;
height: 100%;
background: transparent;
transform-style: preserve-3d;
-webkit-clip-path: polygon(50% 0, 100% 100%, 0% 100%);
clip-path: polygon(50% 0, 100% 100%, 0% 100%);
}
/* Rotation of –109.5° is angle(C, M[AB], D), per http://www.f-lohmueller.de/pov_tut/geo/geom_200e.htm, 180° – atan(2 * sqrt(2)) ≈ 109.5° */
.tetra .face2 {
transform-origin: 0% 100%;
transform: rotate(-60deg) rotatex(-109.5deg);
background: rgb(190, 0, 0);
}
.tetra .face3 {
transform-origin: 100% 100%;
transform: rotate(60deg) rotatex(-109.5deg);
background-color:blue;
}
.tetra .face4 {
transform-origin: 50% 100%;
transform: rotate(180deg) rotatex(-109.5deg);
background: rgb(76, 190, 0);
}
.tetra .face4 p {
transform: scale(-1, 1);
top: 60%;
left: 50%;
text-align: center;
width: 93px;
margin: 0px;
position: relative;
font-size: 30px;
position: relative;
font-weight: bold;
}
.tetra .face2 p {
transform: scale(-1, 1);
font-size: 30px;
text-align: center;
top: 60%;
left: 50%;
position: relative;
width: 93px;
margin: 0px;
font-weight: bold;
}
.tetra .face3 p {
transform: scale(-1, 1);
font-size: 30px;
text-align: center;
top: 60%;
left: 45%;
position: relative;
width: 40%;
font-weight: bold;
}
#keyframes rotate {
0% {
transform: rotatex(90deg) rotateY(0deg) rotatez(0deg);
}
100% {
transform: rotatex(90deg) rotateY(0deg) rotatez(360deg);
}
}
<html>
<head>
<link rel="stylesheet" href="pyramid.css">
</head>
<div style="height:100px;" onmousedown="spin()">
<div class="tetra">
<div class="face1"></div>
<div class="face2">
<p>TEXTFACE2<button onclick="window.Open(cube.html)">buttonface2</button></p>
</div>
<div class="face4">
<p>TEXTFACE3<button onclick="window.Open(cube.html)">buttonface4</button></p>
</div>
<div class="face3" "><p>TEXTFACE3<button onclick="window.Open(cube.html) "">buttonface3</button>
</p>
</div>
</div>
</div>
<script>
let rotation = 0;
function spin() {
const collection = document.getElementsByClassName("tetra");
collection[0].style.transform = "rotatex(90deg) rotateY(0deg) rotateZ(" + rotation + "deg)";
rotation = rotation + 120;
}
</script>
<style>
.tetra {
transform: rotatex(90deg) rotateY(0deg) rotatez(0deg);
}
</style>
</html>
The :hover effect works only when forced via dev tools but not on mouse hover.
I tried changing browsers from mozilla, chrome to safari but no luck
Why is this happening?
I want the text(mary...) to appear on the image as soon as i hover...
Here is my code,
.story {
width: 75%;
color: $color-black;
margin: 0 auto;
background-color: $color-white;
border-radius: 3px;
padding: 9rem 6rem;
padding-left: 9rem;
font-size: $default-font-size;
transform: skewX(-12deg);
& > * {
transform: skewX(12deg);
}
&__shape {
width: 17rem;
height: 17rem;
float: left;
-webkit-shape-outside: circle(50% at 50% 50%);
shape-outside: circle(50% at 50% 50%);
-webkit-clip-path: circle(50% at 50% 50%);
clip-path: circle(50% at 50% 50%);
transform: translateX(-3rem) skewX(12deg);
position: relative;
}
&__img {
height: 100%;
transform: translateX(-4rem) scale(1.4);
backface-visibility: hidden;
transition: all .5s;
}
&__caption {
text-transform: uppercase;
font-size: 1.7rem;
position: absolute;
top: 50%;
left: 55%;
transform: translate(-50%, 30%);
transition: all .4s;
color: $color-white;
opacity: 0;
&:hover {
opacity: 1;
transform: translate(-50%, -50%);
}
}
<div class="story">
<figure class="story__shape">
<img src="/img/nat-8.jpg" alt="Blonde" class="story__img">
<figcaption class="story__caption">mary smith</figcaption>
</figure>
</div>
If you want to show the caption when you hover on the image, how about if you apply :hover to &__shape?
https://codepen.io/kreediam/pen/pojmEwJ
&__shape {
width: 17rem;
height: 17rem;
float: left;
-webkit-shape-outside: circle(50% at 50% 50%);
shape-outside: circle(50% at 50% 50%);
-webkit-clip-path: circle(50% at 50% 50%);
clip-path: circle(50% at 50% 50%);
transform: translateX(-3rem) skewX(12deg);
position: relative;
&:hover {
.story__caption {
opacity: 1;
transform: translate(-50%, -50%);
}
}
}
I am trying to recreate the following logo:
Here's what I've tried so far,
html,
body,
* {
margin: 0;
padding: 0;
box-sizing: border-box;
position: absolute;
overflow: hidden;
}
body {
background: #222;
display: flex;
flex-direction: column;
align-items: center;
justify-content: center;
height: 100vh;
width: 100vw;
}
#logo {
width: 80vmin;
height: 80vmin;
background: linear-gradient( to top, #f60 0%, #f60 20%, #222 20%, #222 22%, transparent 22%, transparent 100%);
border-radius: 50%;
z-index: 10;
}
.seg {
width: 80vmin;
height: 80vmin;
background: linear-gradient( to top, #f60 0%, #f60 20%, #ddd 20%, #ddd 22%, transparent 22%, transparent 100%);
border-radius: 50%;
border: solid #ddd 4px;
}
#seg2 {
z-index: 12;
transform: rotate(45deg);
}
#seg3 {
z-index: 13;
transform: rotate(90deg);
}
#seg3 {
z-index: 13;
transform: rotate(90deg);
}
#seg4 {
z-index: 14;
transform: rotate(135deg);
}
#seg5 {
z-index: 15;
transform: rotate(180deg);
}
#seg6 {
z-index: 16;
transform: rotate(225deg);
}
#seg7 {
z-index: 17;
transform: rotate(270deg);
}
#seg8 {
z-index: 1;
transform: rotate(315deg);
}
#seg9 {
z-index: 8;
transform: rotate(360deg);
}
#seg1 {
width: 80vmin;
height: 80vmin;
border-radius: 50%;
z-index: 999;
background: conic-gradient( at 30% 80%, transparent 0%, transparent 25%, #f60 25%, #f60 50%, transparent 50%);
}
<div id="logo">
<div class="seg" id="seg2"></div>
<div class="seg" id="seg3"></div>
<div class="seg" id="seg4"></div>
<div class="seg" id="seg5"></div>
<div class="seg" id="seg6"></div>
<div class="seg" id="seg7"></div>
<div class="seg" id="seg8"></div>
<div class="seg" id="seg9"></div>
</div>
I made a circular div with class .seg and used linear-gradient to make the circular segments. Then I rotated these segments to create aperture but the last segment is the hurdle.
I then tried to used conic-gradient to cut off the corners of the segments on the left but this just forms an Octagon in the middle :(
Here's the code of 2nd Attempt:
html,
body,
* {
margin: 0;
padding: 0;
box-sizing: border-box;
position: absolute;
overflow: hidden;
}
body {
background: #222;
display: flex;
flex-direction: column;
align-items: center;
justify-content: center;
height: 100vh;
width: 100vw;
}
#logo {
width: 80vmin;
height: 80vmin;
border-radius: 50%;
z-index: 10;
}
.seg {
width: 80vmin;
height: 80vmin;
background: conic-gradient( at 30% 80%, transparent 0%, transparent 25%, #f60 25%, #f60 37.5%, transparent 37.5%);
border-radius: 50%;
}
#seg2 {
z-index: 12;
transform: rotate(45deg);
}
#seg3 {
z-index: 13;
transform: rotate(90deg);
}
#seg3 {
z-index: 13;
transform: rotate(90deg);
}
#seg4 {
z-index: 14;
transform: rotate(135deg);
}
#seg5 {
z-index: 15;
transform: rotate(180deg);
}
#seg6 {
z-index: 16;
transform: rotate(225deg);
}
#seg7 {
z-index: 17;
transform: rotate(270deg);
}
#seg8 {
z-index: 1;
transform: rotate(315deg);
}
#seg9 {
z-index: 8;
transform: rotate(360deg);
}
<div id="logo">
<div class="seg" id="seg2"></div>
<div class="seg" id="seg3"></div>
<div class="seg" id="seg4"></div>
<div class="seg" id="seg5"></div>
<div class="seg" id="seg6"></div>
<div class="seg" id="seg7"></div>
<div class="seg" id="seg8"></div>
<div class="seg" id="seg9"></div>
</div>
I make the 8 triangles as child one of other, so we don't need to apply a specific rotation and position to each one, as each is relative to it's parent.
I also use :before pseudo element inside each <i>, so we don't need more elements on the html code and we can add extra transformation to the triangles without deform the logo.
The size is relative to the #logo's font-size value, so change it and all is relative.
I also put a closing animation when you hover it with the mouse.
I don't need to hide pieces with other elements, so we can place it over anything and just works. (like the gradient that i put on this example.)
body {
margin: 0;
padding: 0;
background: linear-gradient(#0FF, #004);
display: flex;
align-items: center;
justify-content: center;
height: 100vh;
width: 100vw;
}
#logo {
font-size: 10px;
height: 20em;
width: 20em;
border-radius: 10em;
position: relative;
--triangle-size: 4em;
--triangle-skew: 15deg;
transition: 2s;
overflow: hidden;
}
#logo:hover {
transform: rotate(45deg);
--triangle-skew: 45deg;
}
#logo i {
position: absolute;
transform: rotate(-45deg);
top: 5.5em;
left: .5em;
transition: 2s;
}
#logo i::before {
content: "";
display: block;
width: 0;
height: 0;
border: var(--triangle-size) solid #000;
border-right: var(--triangle-size) solid transparent;
border-bottom: var(--triangle-size) solid transparent;
transform: skew(calc(var(--triangle-skew)*-1), var(--triangle-skew));
transition: 2s;
}
#logo > i {
top: 9.5em;
left: -0.5em;
}
<div id="logo">
<i ><i ><i ><i ><i ><i ><i ><i >
</i></i></i></i></i></i></i></i>
</div>
I don't know if this helps, but I would recommend using an <svg> to do the task.
I have to make a logo shape in my website. The design is given below. How do I develop that?
For the first part of the logo I have created it using CSS3 skew property,
I have fiddled the link below. How do I develop the triangle section and the third part of the logo. The triangle is slider, so images inside should change.
https://jsfiddle.net/iamshajeer/x2og8utk/1/
.logo-menu {
height: 76%;
left: 11%;
margin: 0 auto;
width: 80%;
}
.first-part {
display: inline-block;
left: 135px;
position: relative;
transform: skew(-22deg);
width: 180px;
}
.menu-1{
background:red
}
.menu-2{
background:blue
}
.menu-3{
background:yellow
}
<div class="logo-menu">
<div class="first-part">
<div class="menu-1" style="height: 167px;">
<h3>About Us</h3>
</div>
<div class="menu-2" style="height: 167px;">
<h3>Gallery</h3>
</div>
<div class="menu-3" style="height: 167px;">
<h3>Get in Touch with</h3>
</div>
</div>
</div>
You could use CSS transforms to rotate and skew an element into a diamond, and then reverse those transforms for the child elements. If you have overflow: hidden; on the diamond and position the diamond in a wrapper that also has overflow: hidden;, you could produce a clipping triangle with content using just CSS.
Working Example (Codepen):
/* Clip the bottom half of the diamond. */
.triangle-wrap {
width: 400px;
height: 400px;
position: relative;
overflow: hidden;
}
/* Rotate and skew to create a diamond. */
.triangle {
background: grey;
position: absolute;
bottom: -50%;
width: 100%;
height: 100%;
overflow: hidden;
-webkit-transform: rotate(45deg) skew(20deg, 20deg);
-moz-transform: rotate(45deg) skew(20deg, 20deg);
-ms-transform: rotate(45deg) skew(20deg, 20deg);
transform: rotate(45deg) skew(20deg, 20deg);
}
/* Reset the skew and rotation. */
.triangle-reset {
width: 100%;
height: 100%;
position: relative;
-webkit-transform: skew(-20deg, -20deg) rotate(-45deg);
-moz-transform: skew(-20deg, -20deg) rotate(-45deg);
-ms-transform: skew(-20deg, -20deg) rotate(-45deg);
transform: skew(-20deg, -20deg) rotate(-45deg);
}
/* Create a content wrapper. */
.triangle-content {
background: url('http://placehold.it/400x400') no-repeat;
background-position: center center;
background-size: cover;
position: relative;
width: 120%;
height: 120%;
left: -10%;
bottom: 65%;
}
/* Visual aid. */
html {
min-height: 100%;
background: linear-gradient(to bottom, #336666 0%,#663366 100%);
}
<div class="triangle-wrap">
<div class="triangle">
<div class="triangle-reset">
<div class="triangle-content">
</div>
</div>
</div>
</div>
background-clip is what you're looking for. Check out this great article:
https://css-tricks.com/clipping-masking-css/
Here's an online tool to help you generate shapes:
http://bennettfeely.com/clippy/
After you generate each shape, you can position them to look like your image.
It is not perfect what you want but near to that.
Right side first div not looking good.
.third-part {
display: inline-block;
left: 500px;
position: relative;
transform: skew(22deg);
width: 180px;
}
.logo-menu {
height: 76%;
left: 11%;
margin: 0 auto;
width: 80%;
}
.first-part {
display: inline-block;
left: 135px;
position: relative;
transform: skew(-22deg);
width: 180px;
}
.menu-1{
background:red
}
.menu-10{
background: blue;
/* Skew */
left: -70px;
position: relative;
transform: skew(50deg);
width: 190px;
}
.menu-2{
background:blue
}
.menu-3{
background:yellow
}
.second-part {
top: 36%;
}
.second-part {
}
.second-part {
display: inline-block;
height: 100%;
left: 240px;
position: absolute;
top: 25%;
width: 520px;
}
.second-part .triangle-shape {
left: 4%;
margin: 0;
max-width: 700px;
position: absolute;
}
.wrap {
display: inline-block;
margin: 240px 0;
transform: rotate(45deg) translate3d(0px, 0px, 0px);
transition: transform 300ms ease-out 0s;
width: 500px;
}
.crop {
height: 465px;
margin: 0;
overflow: hidden;
position: relative;
transform: skew(22deg, 22deg) translate3d(0px, 0px, 0px);
width: 450px;
}
.crop img {
height: 650px;
left: -50%;
opacity: 1;
position: absolute;
top: -50%;
transform: skew(-20deg, -20deg) rotate(-45deg);
transition: opacity 300ms ease-in-out 0s;
width: 500px;
}
}
.second-part .triangle-shape {
left: 4%;
margin: 0;
max-width: 700px;
position: absolute;
}
.wrap {
display: inline-block;
margin: 240px 0;
transform: rotate(45deg) translate3d(0px, 0px, 0px);
transition: transform 300ms ease-out 0s;
width: 500px;
}
.crop {
height: 465px;
margin: 0;
overflow: hidden;
position: relative;
transform: skew(22deg, 22deg) translate3d(0px, 0px, 0px);
width: 450px;
}
.crop img {
height: 650px;
left: -50%;
opacity: 1;
position: absolute;
top: -50%;
transform: skew(-20deg, -20deg) rotate(-45deg);
transition: opacity 300ms ease-in-out 0s;
width: 500px;
}
<div class="logo-menu">
<div class="first-part">
<div class="menu-1" style="height: 167px;">
<h3>About Us</h3>
</div>
<div class="menu-2" style="height: 167px;">
<h3>Gallery</h3>
</div>
<div class="menu-3" style="height: 167px;">
<h3>Get in Touch with</h3>
</div>
</div>
<div class="second-part">
<div class="triangle-shape">
<div class="wrap">
<div class="crop">
<img alt="" src="http://s23.postimg.org/wlo0phrsb/triangle01.jpg">
<h2>Projects</h2>
</div>
</div>
</div>
</div>
<div class="third-part">
<div class="menu-10" style="height: 120px;">
<h3>Products</h3>
</div>
<div class="menu-2" style="height: 167px;">
<h3>Services</h3>
</div>
<div class="menu-3" style="height: 167px;">
<h3>Location Map</h3>
</div>
</div>
</div>
Hope it will help to move forward.
Check Fiddle.
You can use SVG (http://www.w3schools.com/svg/) to draw and position the shapes and then apply CSS over them like color and backgound to get the desired results.
I'm trying to create a circular menu with radials using html and css, but the white borders are not built well. And it is not look fine in google chrome (not like a circle). I need get the last white radial, between item5 and item6. I have tried the next code:
DEMO
HTML
<div id="menu">
<div class="item1 item">
<div class="content">Solución Aula Digital</div>
</div>
<div class="item2 item">
<div class="content">Live Streaming</div>
</div>
<div class="item3 item">
<div class="content">Social Tecal Online</div>
</div>
<div class="item4 item">
<div class="content">FlexScorn</div>
</div>
<div class="item5 item">
<div class="content">Video On Demand</div>
</div>
<div id="wrapper6">
<div class="item6 item">
<div class="content">Video Colaboración</div>
</div>
</div>
<div id="center">
</div>
</div>
CSS
#menu {
background: #aaa;
position: relative;
width: 300px;
height: 300px;
margin: 0 auto;
overflow: hidden;
border-radius: 155px;
-moz-border-radius: 90px;
-webkit-border-radius: 90px;
}
#center {
position: absolute;
left: 60px;
top: 60px;
width: 180px;
height: 180px;
z-index: 10;
background: #FFFFFF;
border-radius: 100px;
-moz-border-radius: 100px;
-webkit-border-radius: 100px;
}
#center a {
display: block;
width: 100%;
height: 100%
}
.item {
background: #aaa;
overflow: hidden;
position: absolute;
transform-origin: 100% 100%;
-moz-transform-origin: 100% 100%;
-webkit-transform-origin: 100% 100%;
transition: background .5s;
-moz-transition: background .5s;
-webkit-transition: background .5s;
-o-transition: background .5s;
-ms-transition: background .5s;
border: 3px solid #FFFFFF;
}
.item:hover {
background: #eee
}
.item1 {
z-index: 1;
transform: rotate(60deg);
-moz-transform: rotate(60deg);
-webkit-transform: rotate(60deg);
width: 134px;
height: 134px;
}
.item2 {
z-index: 2;
transform: rotate(120deg);
-moz-transform: rotate(120deg);
-webkit-transform: rotate(120deg);
width: 150px;
height: 150px;
}
.item3 {
z-index: 3;
transform: rotate(180deg);
-moz-transform: rotate(180deg);
-webkit-transform: rotate(180deg);
width: 150px;
height: 150px;
}
.item4 {
z-index: 4;
transform: rotate(240deg);
-moz-transform: rotate(240deg);
-webkit-transform: rotate(240deg);
width: 152px;
height: 152px;
}
.item5 {
z-index: 5;
transform: rotate(300deg);
-moz-transform: rotate(300deg);
-webkit-transform: rotate(300deg);
width: 151px;
height: 151px;
}
.item6 {
border: none;
position: absolute;
z-index: 6;
transform: rotate(-30deg);
-moz-transform: rotate(-30deg);
-webkit-transform: rotate(-30deg);
width: 140px;
height: 140px;
}
#wrapper6 {
position: absolute;
width: 160px;
height: 160px;
/*overflow: hidden;*/
transform-origin: 100% 100%;
-moz-transform-origin: 100% 100%;
-webkit-transform-origin: 100% 100%;
/*border: 2px solid #FFFFFF;*/
}
.item1 .content {
left: 0px;
top: 17px;
transform: rotate(-60deg);
-moz-transform: rotate(-60deg);
-webkit-transform: rotate(-60deg);
}
.item2 .content {
left: -5px;
top: 31px;
transform: rotate(-59deg);
-moz-transform: rotate(-59deg);
-webkit-transform: rotate(-59deg);
}
.item3 .content {
left: -40px;
top: 8px;
transform: rotate(-237deg);
-moz-transform: rotate(-237deg);
-webkit-transform: rotate(-237deg);
}
.item4 .content {
left: -43px;
top: 4px;
transform: rotate(-240deg);
-moz-transform: rotate(-240deg);
-webkit-transform: rotate(-240deg);
}
.item5 .content {
left: -52px;
top: 7px;
transform: rotate(-247deg);
-moz-transform: rotate(-247deg);
-webkit-transform: rotate(-247deg);
}
.item6 .content {
left: 26px;
top: -3px;
transform: rotate(-29deg);
-moz-transform: rotate(-29deg);
-webkit-transform: rotate(-29deg);
}
.content, .content a {
width: 100%;
height: 100%;
text-align: center
}
.content {
position: absolute;
}
.content a {
line-height: 100px;
display: block;
position: absolute;
text-decoration: none;
font-family: 'Segoe UI', Arial, Verdana, sans-serif;
font-size: 12px;
/*text-shadow: 1px 1px #eee;
text-shadow: 0 0 5px #fff, 0 0 5px #fff, 0 0 5px #fff*/
}
.display-target {
display: none;
text-align: center;
opacity: 0;
}
.display-target:target {
display: block;
opacity: 1;
animation: fade-in 1s;
-moz-animation: fade-in 1s;
-webkit-animation: fade-in 1s;
-o-animation: fade-in 1s;
-ms-animation: fade-in 1s;
}
#keyframes fade-in {
from { opacity: 0 }
to { opacity: 1 }
}
#-moz-keyframes fade-in {
from { opacity: 0 }
to { opacity: 1 }
}
#-webkit-keyframes fade-in {
from { opacity: 0 }
to { opacity: 1 }
}
#-o-keyframes fade-in {
from { opacity: 0 }
to { opacity: 1 }
}
#-ms-keyframes fade-in {
from { opacity: 0 }
to { opacity: 1 }
}
I need get the six borders like this image :
Help, please!
Your border-radius was defined in px instead of %
JSfiddle
#menu {
-moz-border-radius: 100%;
-webkit-border-radius: 100%;
}
This is the reason it's not being a circle in Chrome:
border-radius: 155px;
-moz-border-radius: 90px;
-webkit-border-radius: 90px;
You're defining a different border radius for Webkit and Mozilla than for everyone else. Use the same value in all three styles.
Also:
border-radius: 50%;
...will get you a circle no matter the size of the element.