Skip to content

Instantly share code, notes, and snippets.

@yoksel
Created October 9, 2013 16:31
Show Gist options
  • Save yoksel/6904070 to your computer and use it in GitHub Desktop.
Save yoksel/6904070 to your computer and use it in GitHub Desktop.
Мой вариант этого примера http://css-tricks.com/conical-gradients-css/
UL, LI {
position: relative;
margin: 0;
padding: 0;
}
.wrapper {
width: 20em;
height: 20em;
margin: 2em auto 0;
border-radius: 50%;
overflow: hidden;
box-shadow: inset 0 0 3em 5em rgba(0, 0, 0, 0.3);
}
UL {
position: relative;
-webkit-filter : url(#css_blur);
-moz-filter : url(#css_blur);
filter : url(#css_blur);
}
LI {
list-style: none;
overflow: hidden;
}
LI,
LI:before,
LI:after {
position: absolute;
width: 10em;
height: 10em;
transform-origin: right bottom;
}
LI:before,
LI:after {
content: "";
display: block;
}
LI:before {
transform: rotate(30deg);
}
LI:after {
transform: rotate(60deg);
}
LI {
background: hsl(0,90%,60%);
}
LI:before {
background: hsl(30,100%,57%);
}
LI:after {
background: hsl(55,100%,60%);
}
LI:nth-child(2) {
transform: rotate(90deg);
background: hsl(80,90%,55%);
}
LI:nth-child(2):before {
background: hsl(120,80%,65%);
}
LI:nth-child(2):after {
background: hsl(150,80%,55%);
}
LI:nth-child(3) {
transform: rotate(180deg);
background: hsl(180,80%,55%);
}
LI:nth-child(3):before {
background: hsl(210,90%,55%);
}
LI:nth-child(3):after {
background: hsl(240,100%,67%);
}
LI:nth-child(4) {
transform: rotate(270deg);
background: hsl(270,90%,63%);
}
LI:nth-child(4):before {
background: hsl(300,80%,63%);
}
LI:nth-child(4):after {
background: hsl(330,90%,55%);
}
<!DOCTYPE html>
<html>
<head>
<script src="http://cdnjs.cloudflare.com/ajax/libs/prefixfree/1.0.7/prefixfree.min.js"></script>
<meta charset=utf-8 />
<title>JS Bin</title>
</head>
<body>
<div class="wrapper">
<ul class="wheel">
<li class="color"></li>
<li class="color"></li>
<li class="color"></li>
<li class="color"></li>
</ul>
</div>
<svg>
<filter id="css_blur">
<feGaussianBlur stdDeviation="17"/>
</filter>
</svg>
</body>
</html>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment