<html>
<head>
<meta charset="utf-8">
<title>iOS blurred style</title>
</head>
<body>
<h1>iOS blurred style with <code>backdrop-filter</code></h1>
<div class="Box">
<p class="Box-header">Header bar</p>
<div class="Box-texts">
<p class="Box-text">Who is that guy. It's already mutated into human form, shoot it. It's cold, damn cold. Ha, ha, ha, Einstein, you little devil. Einstein's clock is exactly one minute behind mine, it's still ticking. Hey, Doc, we better back up, we don't have enough roads to get up to 88. Yet.</p>
<p class="Box-text">What's going on? Where have you been all week? What? Uh Doc, uh no. No, don't be silly. Believe me, Marty, you're better off not having to worry about all the aggravation and headaches of playing at that dance. Oh, oh a rematch, why, were you cheating?</p>
<p class="Box-text">About 30 years, it's a nice round number. Now, now, Biff, now, I never noticed any blindspot before when I would drive it. Hi, son. C'mon, he's not that bad. At least he's letting you borrow the car tomorrow night. Hey Marty, I'm not your answering service, but you're outside pouting about the car, Jennifer Parker called you twice. Watch it, Goldie.</p>
</div>
</div>
<p>Works with Safari 9, iOS 9</p>
</body>
</html>
html {
font: 1em/1.4 sans-serif;
text-align: center;
}
* {
box-sizing: border-box;
}
::scrollbar {
display: none;
}
.Box {
position: relative;
width: 300px; height: 400px;
overflow: hidden;
margin: auto;
background: url(https://unsplash.imgix.net/photo-1417962798089-0c93ceaed88a?fit=crop&fm=jpg&h=400&q=75&w=300);
border: 1px solid #111;
}
.Box-header {
position: absolute;
top: 0; left: 0; right: 0; z-index: 1;
line-height: 60px;
margin: 0;
font-size: 1.4em;
font-weight: bold;
background: rgba(255,255,255,.95);
}
/* effect: see through the header bar */
@supports (backdrop-filter: none) or (backdrop-filter: none) {
.Box-header {
top: -5px; left: -5px; right: -5px;
line-height: 65px;
background: rgba(255,255,255,.6);
backdrop-filter: brightness(1.5) blur(4px);
backdrop-filter: brightness(1.5) blur(4px);
}
}
.Box-texts {
height: 400px;
padding-top: 50px;
overflow: auto;
overflow-scrolling: touch;
}
.Box-text {
text-align: left;
padding: 1em;
color: #fff;
text-shadow: 0 1px 1px rgba(0,0,0,.8);
}
Output
You can jump to the latest bin by adding /latest
to your URL
Keyboard Shortcuts
Shortcut | Action |
---|---|
ctrl + [num] | Toggle nth panel |
ctrl + 0 | Close focused panel |
ctrl + enter | Re-render output. If console visible: run JS in console |
Ctrl + l | Clear the console |
ctrl + / | Toggle comment on selected lines |
ctrl + ] | Indents selected lines |
ctrl + [ | Unindents selected lines |
tab | Code complete & Emmet expand |
ctrl + shift + L | Beautify code in active panel |
ctrl + s | Save & lock current Bin from further changes |
ctrl + shift + s | Open the share options |
ctrl + y | Archive Bin |
Complete list of JS Bin shortcuts |
JS Bin URLs
URL | Action |
---|---|
/ | Show the full rendered output. This content will update in real time as it's updated from the /edit url. |
/edit | Edit the current bin |
/watch | Follow a Code Casting session |
/embed | Create an embeddable version of the bin |
/latest | Load the very latest bin (/latest goes in place of the revision) |
/[username]/last | View the last edited bin for this user |
/[username]/last/edit | Edit the last edited bin for this user |
/[username]/last/watch | Follow the Code Casting session for the latest bin for this user |
/quiet | Remove analytics and edit button from rendered output |
.js | Load only the JavaScript for a bin |
.css | Load only the CSS for a bin |
Except for username prefixed urls, the url may start with http://jsbin.com/abc and the url fragments can be added to the url to view it differently. |