Skip to content

Instantly share code, notes, and snippets.

@krman009
Last active July 1, 2021 05:29
Show Gist options
  • Save krman009/7083357 to your computer and use it in GitHub Desktop.
Save krman009/7083357 to your computer and use it in GitHub Desktop.
Like a Mac(OS X) Window (one div)
<div class="mac"></div>
/*
--
-- 2015 by Kaushalya Mandaliya.
-- http://seebeetee.com
-- https://twitter.com/kmandalwala
--
*/
@import "compass/css3";
body {
background: #ddd;
}
.mac {
position: relative;
height: 30em;
width: 52%;
margin: 3em auto;
@include background(linear-gradient(top, #aaa 10%,#ddd 10%,#fff 90%));
@include border-radius(0.5em);
@include box-shadow(inset 0 0.9em 1em #999);
}
.mac:before {
content: '';
position: absolute;
height: 0.8em;
width: 0.8em;
margin: 1em;
@include border-radius(100%);
background: #ccc;
@include box-shadow(1.4em 0em #ccc, 2.8em 0em #ccc);
@include transition(0.3s all ease-in-out);
}
.mac:hover:before {
background: rgba(255, 0, 0, 0.8);
@include box-shadow(1.4em 0em rgba(255, 255, 0, 0.8), 2.8em 0em rgba(0, 255, 0, 0.8));
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment