Pen Settings

HTML

CSS

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. You can use the CSS from another Pen by using it's URL and the proper URL extention.

+ add another resource

JavaScript

Babel includes JSX processing.

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.

+ add another resource

Packages

Add Packages

Search for and use JavaScript packages from npm here. By selecting a package, an import statement will be added to the top of the JavaScript editor for this package.

Behavior

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.

Format on Save

If enabled, your code will be formatted when you actively save your Pen. Note: your code becomes un-folded during formatting.

Editor Settings

Code Indentation

Want to change your Syntax Highlighting theme, Fonts and more?

Visit your global Editor Settings.

HTML

              
                <div class="content">
  <div class="intro">
    <h1>Half Circle Hover Effect</h1>
    <p>simple hover effect using border-radius and some CSS3 animation</p>
    <p>fork of a <a href="https://codepen.io/demersdesigns/pen/IAFht">pen</a> by <a href="https://codepen.io/demersdesigns/">@demerdesigns</a><br />uses borders instead of extra divs</p>
  </div>
  <hr />
  <div class="spinner_wrapper">
    <div class="spinner">
      <div class="inner_spin">
      </div>
      <span class="fullie"><img src="http://lorempixel.com/600/600" /></span>
    </div>

    <div class="spinner">
      <div class="inner_spin">
      </div>
      <span class="fullie"><img src="http://lorempixel.com/600/600/" /></span>
    </div>

    <div class="spinner">
      <div class="inner_spin level">
      </div>
      <span class="fullie"><img src="http://lorempixel.com/600/600" /></span>
    </div>
  </div>
</div>
              
            
!

CSS

              
                @import compass

$base: 20em
$base_minus_one: ($base - 1)

*
  box-sizing: border-box

html
  background: url(http://subtlepatterns.subtlepatterns.netdna-cdn.com/patterns/bedge_grunge.png) repeat

body
  color: #222

.intro
  text-align: center
  display: block
  padding-bottom: .25em
  margin: 0 auto

hr
  margin-bottom: 2em

h1
  font-family: 'Oleo Script'
  text-shadow: white 1px 1px 0
  color: rgb(39, 75, 106)

p > a
  color: rgb(39, 75, 106)
  text-decoration: none
  border-bottom: 1px dashed

p > a:hover
  border-bottom: 1px dotted

.content
  width: 90%
  margin: 0 auto

.spinner_wrapper
  width: 72em
  margin: 0 auto
  
.spinner
  width: $base
  height: $base
  margin: 0 2em
  cursor: pointer
  position: relative
  float: left

.inner_spin
  width: ($base)
  height: ($base)
  border: 9px solid #105B63
  border-right-color: #FFD34E
  border-bottom-color: #FFD34E
  border-radius: 50%
  transition: transform 1s
  /* Hardware acceleration FTW! */
  transform: translateZ(0)

.level
  transform: translateZ(0) rotate(45deg)

.fullie, .halfie
  display: block 
  margin: 0 auto
  position: absolute

.fullie
  width: ($base - 1)
  height: ($base - 1)
  background: #BD4932
  border-radius: ($base - 1)
  z-index: 2
  top: 50%
  left: 50%
  margin-top: -(($base - 1) / 2)
  margin-left: -(($base - 1) / 2)
    
.spinner:hover
  opacity: .95
  .inner_spin
    transform: rotate(180deg)
  .level
    transform: rotate(225deg)
  img
    opacity: .25
  
img
  width: $base_minus_one
  height: $base_minus_one
  border-radius: $base_minus_one
  opacity: 1
  -webkit-transition: all 1s
              
            
!

JS

              
                
              
            
!
999px

Console