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.

+ add another resource


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


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.


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.


                <div class="sean-modal-nav">
    <input type="checkbox" id="checked" class="sean-modal-input" />
    <label for="checked" class="sean-modal-btn"></label>
    <div class="sean-modal-bg">
        <div class="sean-modal-box">
            <div class="sean-box-content">
              <h1>Box Title</h1>
              <p>Box Content</p>


                @import "compass/css3";

body {
  background: #000 url(;
  background-size: cover;
// 變數設定
$btn-bg-color: #F44336;
$btn-color: #FFF;
$btn-font-size: 48px;
$btn-shadow: 0 10px 20px rgba(0, 0, 0, 0.38), 0 6px 6px rgba(0, 0, 0, 0.46);

$box-bg-color: #000;
$box-width: 50%; // 最大到80%;
$box-shadow: 0 10px 20px rgba(0, 0, 0, 0.38), 0 6px 6px rgba(0, 0, 0, 0.46);
$box-border-width: 3px;
$box-border-color: #FFF;

@include keyframes(box-show) {
    from {
        margin-top: -10%;
        @include opacity(0);
    to {
        margin-top: 0;
        @include opacity(1);

/* 按鈕 */
.sean-modal-input {
    display: none;
    ~ .sean-modal-btn {
        position: fixed;
        top: 10%;
        left: 5%;
        z-index: 100;
        display: block;
        cursor: pointer;
        &::before {
            font-family: 'FontAwesome'; // 需先引用 font awesome 的css檔
            content: '\f0c9';
            padding: 6px 12px;
            background-color: $btn-bg-color;
            font-size: $btn-font-size;
            color: $btn-color;
            @include box-shadow($btn-shadow);
    &:checked {
        ~ .sean-modal-btn::before {
            content: '\f00d';
        ~ .sean-modal-bg {
            @include transform(scale(1));
            .sean-box-content {
                @include animation-name(box-show);
                @include animation-delay(.05s);
                @include animation-duration(1.5s);

/* modal */
.sean-modal-bg {
    position: fixed;
    z-index: 99;
    display: table;
    margin-top: -8px;
    margin-left: -8px;
    width: 100%;
    height: 100%;
    background-color: rgba($box-bg-color, .87);
    color: #FFF;
    @include transform-origin(7.5%, 15%);
    @include transform(scale(0));
    @include transition(transform .5s ease);
    .sean-modal-box {
        display: table-cell;
        vertical-align: middle;
        text-align: center;
        > .sean-box-content {
            margin-right: auto;
            margin-left: auto;
            padding: 0;
            width: $box-width;
            border: $box-border-width solid $box-border-color;
            @include box-shadow($box-shadow);
            @include border-radius(8px);

/* 自由設定 */
h1 {
    margin: 0;
    background-color: #000;
    font-size: 24px;
    line-height: 48px;
    @include border-top-radius(8px);