cssAudio - Activefile-genericCSS - ActiveGeneric - ActiveHTML - ActiveImage - ActiveJS - ActiveSVG - ActiveText - Activefile-genericVideo - ActiveLovehtmlicon-new-collectionicon-personicon-teamlog-outoctocatpop-outspinnerstartv

Pen Settings

CSS Base

Vendor Prefixing

Add External Stylesheets/Pens

Any URL's added here will be added as <link>s in order, and before the CSS in the editor. If you link to another Pen, it will include the CSS from that Pen. If the preprocessor matches, it will attempt to combine them before processing.

Quick-add: + add another resource

Add External Scripts/Pens

Any URL's added here will be added as <script>s in order, and run before the JavaScript in the editor. You can use the URL of any other Pen and it will include the JavaScript from that Pen.

Quick-add: + add another resource

Code Indentation

     

Save Automatically?

If active, Pens will autosave every 30 seconds after being saved once.

Auto-Updating Preview

If enabled, the preview panel updates automatically as you code. If disabled, use the "Run" button to update.

            
              <div class="outerCircle">
	<div class="middleCircle">
		<div class="innerCircle">
      
			<div class=" triangle triangle0"></div>
			<div class=" triangle triangle1"></div>
     	<div class=" triangle triangle2"></div>
     	<div class=" triangle triangle3"></div>
     	<div class=" triangle triangle4"></div>
     	<div class=" triangle triangle5"></div>
     	<div class=" triangle triangle6"></div>
     	<div class=" triangle triangle7"></div>
      
    </div>
	</div>
</div>

            
          
!
            
              
$innerRealDimension: 100px;
$innerDimension: $innerRealDimension + 52;
$triangleHeight: ($innerDimension/2)*sin(45);
$class-slug: triangle;

$basicRotation: 22.5;
$colors: #fcbb1d, #ef851d, #dd4b39, #7e3794, #427fed, #43459d, #65b045, #1d8763;


body{
   background: #333;
  
 }
// generic transform
@mixin transform($transforms) {
	-moz-transform: $transforms;
	-o-transform: $transforms;
	-ms-transform: $transforms;
	-webkit-transform: $transforms;
   transform: $transforms;
}
// rotate
@mixin rotate ($deg) {
  @include transform(rotate(#{$deg}deg));
}

//transform origin
@mixin transform-origin ($origin) {
	moz-transform-origin: $origin;
	-o-transform-origin: $origin;
	-ms-transform-origin: $origin;
	-webkit-transform-origin: $origin;
	transform-origin: $origin;
}

@mixin generateTriangles(){
  $angle: 45;
    @for $i from 0 to 8{
          .#{$class-slug}#{$i}{
            @include rotate($basicRotation+($i*$angle));
            border-left-color: nth($colors, $i+1);
          }

    } 
}

.innerCircle{
	margin: auto;
	background: white;
	height: $innerRealDimension;
	width: $innerRealDimension;
	border-radius: 50%;
	overflow: hidden;
	position: relative;
}

.triangle{
	position: absolute;
	background: transparent;
	top: ($innerRealDimension/2) - ($triangleHeight/2);
	left: ($innerRealDimension/2) - ($innerDimension/2);
	width: 0; 
	height: 0; 
	border-top: (($innerDimension/2)*sin(45))/2 solid transparent;
	border-bottom: (($innerDimension/2)*sin(45))/2 solid transparent;
	border-left: $innerDimension/2 solid red;
  
   @include transform-origin(right);
 
  -webkit-transform-style: preserve-3d; 
  -webkit-transform: rotateZ(2deg);
	outline: 1px solid transparent;
}



@include generateTriangles();
            
          
!
999px
Loading ..................

Console