Pen Settings

HTML

CSS

CSS Base

Vendor Prefixing

Add External Stylesheets/Pens

Any URLs 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 its URL and the proper URL extension.

+ 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

Auto Save

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

              
                <!DOCTYPE html>
<html lang="ja">
    <head>
        <meta charset="UTF-8">
        <meta name="viewport" content="width=device-width,initial-scale=1"> 
        <title>モバイルTOP</title>
        <link rel="stylesheet" href="https://stackpath.bootstrapcdn.com/bootstrap/4.3.1/css/bootstrap.min.css" integrity="sha384-ggOyR0iXCbMQv3Xipma34MD+dH/1fQ784/j6cY/iJTQUOhcWr7x9JvoRxT2MZw1T" crossorigin="anonymous">
        <link rel="stylesheet" href="style2.css">
        <script src="https://code.jquery.com/jquery-3.3.1.slim.min.js" integrity="sha384-q8i/X+965DzO0rT7abK41JStQIAqVgRVzpbzo5smXKp4YfRvH+8abtTE1Pi6jizo" crossorigin="anonymous"></script>
        <script src="https://stackpath.bootstrapcdn.com/bootstrap/4.3.1/js/bootstrap.min.js" integrity="sha384-JjSmVgyd0p3pXB1rRibZUAYoIIy6OrQ6VrjIEaFf/nJGzIxFDsf4x0xIM+B07jRM" crossorigin="anonymous"></script>
        <script src="https://cdnjs.cloudflare.com/ajax/libs/popper.js/1.14.7/umd/popper.min.js" integrity="sha384-UO2eT0CpHqdSJQ6hJty5KVphtPhzWj9WO1clHTMGa3JDZwrnQq4sF86dIHNDz0W1" crossorigin="anonymous"></script>
        <script src="https://kit.fontawesome.com/da0fa6be04.js" crossorigin="anonymous"></script>

        <!--[if lt IE 9]>
        <script src="http://html5shiv.googlecode.com/svn/trunk/html5.js"></script>
        <script src="http://css3-mediaqueries-js.googlecode.com/svn/trunk/css3-mediaqueries.js"></script>
        <![endif]-->
        <script src="js/script.js"></script>
    </head>
    <body>
        <!----- ヘッダー ----->
        <header>
            <div id="nav-drawer" class="bg-success py-2 px-3 text-right">
                <!-- チェックボックス -->
                <input id="nav-input" type="checkbox" class="nav-unshown">
                <!-- メニューボタンのアイコン -->
                <label id="nav-open" for="nav-input"><i class="fas fa-bars"></i></label>
                <label class="nav-unshown" id="nav-close" for="nav-input"></label>
                <div id="nav-content">
                    <div class="mobile-nav border-bottom py-2 px-4"><a class="text-secondary" href="#">Top</a></div>
                    <div class="mobile-nav border-bottom py-2 px-4"><a class="text-secondary" href="#">HTML</a></div>
                    <div class="mobile-nav border-bottom py-2 px-4"><a class="text-secondary" href="#">JavaScript</a></div>
                    <div class="mobile-nav border-bottom py-2 px-4"><a class="text-secondary" href="#">PHP</a></div>
                </div>
            </div>
        </header>
        <!----- ヘッダー END ----->
        <!----- メインコンテンツ ----->
        <div><p>テキスと</p></div>
        <div><p>テキスと</p></div>
        <div><p>テキスと</p></div>




        <!----- メインコンテンツ END ----->
        <!----- フッター ----->
        <footer>
            <!-- <div class="btn-group d-flex fixed-bottom" role="group" aria-label="...">
                <a class="btn btn-primary w-100" href="tel:0878977002" role="button"><i class="fa fa-phone" aria-hidden="true"></i> <span>電話</span></a>
                <a class="btn btn-warning w-100" href="https://medihamo.com/contact/" role="button"><i class="fa fa-envelope"></i> <span>お問合せ</span></a>
                <a class="btn btn-danger w-100" href="https://medihamo.com/" role="button"><span>メディハモへ</span></a></a>
                <button type="button" class="btn btn-info w-100">左</button>
                <button type="button" class="btn btn-warning w-100">中</button>
                <button type="button" class="btn btn-danger w-100">右</button>
            </div> -->
        </footer>
        <!----- フッター END ----->
    </body>
</html>


              
            
!

CSS

              
                #nav-drawer {
    /* ポジション指定 */
    position: relative;
}


.nav-unshown {
    /* 存在を消す */
    display:none;
}

/*アイコンのスペース*/
#nav-open {
    display: inline-block;
    width: 30px;
    height: 22px;
    vertical-align: middle;
}

/*閉じる用の薄黒カバー*/
#nav-close {
    display: none;/*はじめは隠しておく*/
    position: fixed;
    z-index: 99;
    top: 0;/*全体に広がるように*/
    left: 0;
    width: 100%;
    height: 100%;
    background: black;
    opacity: 0;
    transition: .3s ease-in-out;
}

/*中身*/
#nav-content {
    overflow: auto;
    position: fixed;
    top: 0;
    left: 0;
    z-index: 9999;/*最前面に*/
    width: 80vw;/*右側に隙間を作る(閉じるカバーを表示)*/
    height: 100vh;
    background: #fff;/*背景色*/
    transition: .3s ease-in-out;/*滑らかに表示*/
    -webkit-transform: translateX(100vw);
    transform: translateX(100vw);/*左に隠しておく*/
}

/*チェックが入ったらもろもろ表示*/
#nav-input:checked ~ #nav-close {
    display: block;/*カバーを表示*/
    opacity: .5;
}

#nav-input:checked ~ #nav-content {
    -webkit-transform: translateX(20vw);
    transform: translateX(20vw);/*中身を表示(右からスライド)*/
    box-shadow: 6px 0 25px rgba(0,0,0,.15);
}

.mobile-nav {
    list-style: none;
}

.mobile-nav {
    text-decoration: none;
}

.mobile-nav:hover {
    background-color: rgb(231, 231, 231);
}


              
            
!

JS

              
                
              
            
!
999px

Console