Skip to content

Instantly share code, notes, and snippets.

@farazdagi
Forked from jarthod/browser-mockup.png
Last active August 21, 2017 09:33
Show Gist options
  • Save farazdagi/4b1be106f31d07c7af30 to your computer and use it in GitHub Desktop.
Save farazdagi/4b1be106f31d07c7af30 to your computer and use it in GitHub Desktop.
<div class="browser-mockup">
<img src="http://placehold.it/500x300/fff/eee" />
</div>
<div class="browser-mockup with-tab">
<img src="http://placehold.it/500x300/fff/eee" />
</div>
<div class="browser-mockup with-url">
<img src="http://placehold.it/500x300/fff/eee" />
</div>
.browser-mockup {
border-top: 2em solid rgba(230, 230, 230, 0.7);
box-shadow: 0 0.1em 1em 0 rgba(0, 0, 0, 0.4);
position: relative;
border-radius: 3px;
}
.browser-mockup:before {
display: block;
position: absolute;
content: '';
top: -1.25em;
left: 1em;
width: 0.5em;
height: 0.5em;
border-radius: 50%;
background-color: #f44;
box-shadow: 0 0 0 2px #f44, 1.5em 0 0 2px #9b3, 3em 0 0 2px #fb5;
}
.browser-mockup.with-tab:after {
display: block;
position: absolute;
content: '';
top: -2em;
left: 5.5em;
width: 20%;
height: 0em;
border-bottom: 2em solid white;
border-left: 0.8em solid transparent;
border-right: 0.8em solid transparent;
}
.browser-mockup.with-url:after {
display: block;
position: absolute;
content: '';
top: -1.6em;
left: 5.5em;
width: calc(100% - 6em);
height: 1.2em;
border-radius: 2px;
background-color: white;
}
.browser-mockup > * {
display: block;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment