Pen Settings

HTML

CSS

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. You can use the CSS from another Pen by using it's URL and the proper URL extention.

+ 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

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.

HTML

              
                <form method="post">
  <label for="name">タイトル</label><input value="" type="text" id="title" class="fmText" name="title"><br>
  <label for="name">説明</label><input value="" type="text" id="dec" class="fmText" name="dec"><br>
  <label for="name">画像URL</label><input value="" type="text" id="imgurl" class="fmText" name="imgurl"><br>
  <label for="name">ショップ1</label><input value="Amazon" type="text" id="shop1" class="fmText" name="shop1"><br>
  <label for="name">リンク1</label><input value="" type="text" id="link1" class="fmText" name="link1"><br/>
  <label for="name">ショップ2</label><input value="楽天" type="text" id="shop2" class="fmText" name="shop2"><br>
  <label for="name">リンク2</label><input value="" type="text" id="link2" class="fmText" name="link2"><br/>
  <label for="name">ショップ3</label><input value="" type="text" id="shop3" class="fmText" name="shop3"><br>
  <label for="name">リンク3</label><input value="" type="text" id="link3" class="fmText" name="link3"><br/>
  <br>
  <button type="button" onClick="getValue()">作成</button>
</form>
  <br>
  <span id="output-message"></span>
              
            
!

CSS

              
                
              
            
!

JS

              
                function getValue() {
    var title = document.getElementById("title").value;
    var dec = document.getElementById("dec").value;
    var imgurl = document.getElementById("imgurl").value;
    var shop1 = document.getElementById("shop1").value;
    var shop2 = document.getElementById("shop2").value;
    var shop3 = document.getElementById("shop3").value;
    var link1 = document.getElementById("link1").value;
    var link2 = document.getElementById("link2").value;
    var link3 = document.getElementById("link3").value;
    
    var output1 ='<div><a class="btn __orange" target="_blank" rel="nofollow noopener" href="' + link1 + '">' +shop1+ '</a></div>\n';
    var output2 ='<div><a class="btn __red" target="_blank" rel="nofollow noopener" href="' + link2 + '">' +shop2+ '</a></div>\n';
    var output3 ='<div><a class="btn __green" target="_blank" rel="nofollow noopener" href="' + link3 + '">' +shop3+ '</a></div>\n';

    var fronttext = ('<div class="kattene">\n' + '<div class="kattene__imgpart">' + '<a target="_blank" rel="nofollow noopener" href="'+ link3 +'">' + '<img src="' + imgurl + '"></a>' + '</div>\n' + '<div class="kattene__infopart">\n' + '<div class="kattene__title">' + '<a target="_blank" rel="nofollow noopener" href="' + link3 + '"> ' + title + '</a>' + '</div>\n' +
    '<div class="kattene__description">' + dec + '</div>\n' + '<div class="kattene__btns __three">\n');
    var behindtext = '</div></div></div>';
    document.getElementById("output-message").innerText = fronttext + output1 + output2 + output3 + behindtext;
  }
              
            
!
999px

Console