Pen Settings



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


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.


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.


                <!DOCTYPE html>
<html lang="ja">

    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <link rel="stylesheet" href="style.css">


    <header class="header">
        <div class="header-inner">
            <h1 class="logo"><a href="">ロゴ</a></h1>
            <div class="menu-wrapper">
                <div class="btn">
                    <span class="bar bar-top"></span>
                    <span class="bar bar-middle"></span>
                    <span class="bar bar-bottom"></span>
                <nav class="menu-lists">
                        <li><a href="#">HTMLについて</a></li>
                        <li><a href="#">CSSについて</a></li>
                        <li><a href="#">jQueryについて</a></li>
        <div class="main">
    <script src=""></script>
    <script src="js/min.js" type="text/javascript"></script>


                /* ブラウザの初期値をリセット */
body{margin: 0;}

    padding: 0;
    margin: 0;

li{list-style: none;}

    color: #000;
    text-decoration: none;

h1{margin: 0;}
/* ここまでブラウザの初期値をリセット */

    background-color: rgb(237, 100, 100);
    position: fixed;
    width: 100%;

    display: flex;
    justify-content: space-between;
    padding: 15px;

    position: relative;

.menu-lists ul{
    display: flex;

.menu-lists ul li{
    padding: 10px;

    padding-top: 80px;/*追記*/
    height: 1000px;/*メインコンテンツを入れた後で消す*/
    background: rgb(214, 189, 238);/*メインコンテンツを入れた後で消す*/
    text-align: center;/*メインコンテンツを入れた後で消す*/

@media (max-width:768px){
        width: 100%;
        display: block;      
        width: 39px;      
        height: 39px;      
        position: absolute;
        right: 0;
        z-index: 999;/*追記:いつも一番上*/
        width: 20px;      
        height: 2px;        
        display: block;      
        position: absolute;      
        left: 50%;      
        transform: translateX(-50%);      
        background-color: #000;    
    .bar-top{ top: 10px;}
        top: 50%;
        transform: translate(-50%,-50%);
    .bar-bottom{ bottom: 10px;}
    .btn.close .bar-top{      
        transform: translate(-50%,10px) rotate(45deg);      
        transition: transform .3s;    
    .btn.close .bar-middle{      
        opacity: 0;       
        transition: opacity .3s;    
    .btn.close .bar-bottom{      
        transform: translate(-50%,-8px) rotate(-45deg);      
        transition: transform .3s;    
        display: none;
        background-color: lightgreen;
        width: 100vw;
        height: 100vh;
        position: fixed;
        top: 0;
        left: 0;
        padding-top: 50px;
        text-align: center;

    .menu-lists ul{
        display: block;


                $(function() {
$('.btn').on('click',function(){// .btnをクリックすると〜
    $('.btn').toggleClass('close');// .btnにcloseというクラスが追加される
    $('nav').fadeToggle(500);// navの表示・非表示切り替わる