cssAudio - Activefile-genericCSS - ActiveGeneric - ActiveHTML - ActiveImage - ActiveJS - ActiveSVG - ActiveText - Activefile-genericVideo - ActiveLovehtmlicon-new-collectionicon-personicon-teamlog-outoctocatpop-outspinnerstartv

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.

Quick-add: + add another resource

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.

Quick-add: + add another resource

Code Indentation


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.

              <script src="https://cdnjs.cloudflare.com/ajax/libs/riot/2.5.0/riot+compiler.min.js"></script>

<!-- 固定メニュー -->
<ul class="menu">
	<li><a href='#items/1'>1</a></li>
	<li><a href='#items/2'>2</a></li>
	<li><a href='#items/3'>3</a></li>
	<li><a href='#items/4'>4</a></li>
	<li><a href='#items/5'>5</a></li>

<!-- 表示用の受け皿 -->
<app title='ルーティングのテスト'></app>

<!-- 表示するタグを定義 -->
<script type="riot/tag">
      <div class="item_box">
		// #itemのリンクが押された場合に
		// <content></content>に<item></item>をマウント
		riot.route('items/*', function(id) {
			riot.mount('content', 'item', {
				id: id,

	  <div class="item_box">
		  <h2>item{ id }</h2>
		this.id = opts.id;

<!-- マウント -->
              *, *:before, *:after {
  box-sizing: border-box; 
html, body {
  margin: 0;
  padding: 0;
.menu {
  margin: 0;
  padding: 0;
  list-style: none;
  display: table;
  width: 100%;
  position: relative;
  margin-bottom: 40px;
.menu li {
  border: 1px solid #efefef;
  display: table-cell;
  text-align: center;
  padding: 10px 0;
  transition: 0.3s;
.menu li:hover {
  background: #efefef;
  transition: 0.3s;
.menu li a {
  color: #444;
  text-decoration: none;
  display: block;
  transition: 0.3s;
.menu li a:hover {
  opacity: 0.7;
  transition: 0.3s;
.menu:after {
  position: absolute;
  top: 50px;
  left: 0;
  content: "上記をクリックするとページが切り替わります。";
  font-size: 0.6em;
h1 {
  font-size: 1.1em;
  text-align: center;
.item_box {
  padding: 5px;
  width: 80%;
  background: #efefef;
  text-align: center;
  margin: 0 auto;
Loading ..................