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.


    <li><img src="" alt="canyon."></a></li>
    <li><img src="" alt="mountains."></a></li>
    <li><img src="" alt="tree and hill."></a></li>


                main {
  width: 320px;
/*   border: solid 1px #000; */
  height: 100vh;
  margin: 0 auto;
  padding-top: 60px;
  background-color: #fff;

h1 {
  text-align: center;
  font-size: 18px;
  font-weight: lighter;

ul {
  margin-top: 60px;
  display: flex;
  padding-left: 0px;
  justify-content: center;
  gap: 8px;

li {
  width: 90px;
  height: 60px;
  list-style-type: none;
/*   border: solid 1px #000; */

img {
  width: 100%;
  height: 100%;

	background: rgba(95, 95, 95, 0.7);

#tooltip p{
	text-align: center;
	color: #fff;
	font-size: 18px;
	padding: 0 20px 0 20px;



  // 1 画像にマウスを載せたとき
    // 2 tooltip p を bodyに追加
    $("body").append('<div id="tooltip"><p></p></div>');

    // 3 画像のalt属性の値を p に入れる
    $("#tooltip p").html($(this).children().attr("alt"));

    // 4 ツールチップを一度非表示に

    // 5 ツールチップ縦位置:アイコンの縦位置 - 角丸四角形高さ - 三角形高さ
    $("#tooltip").css("top", $(this).offset().top - $("#tooltip").height() - 16);

    // 6 ツールチップ横位置:アイコンの横位置 + (アイコンの幅 - ツールチップの幅)/2
    $("#tooltip").css("left", $(this).offset().left - ($("#tooltip").width() - $(this).width())/2);

    // 7 ツールチップをフェードイン
  }, function(){
    // 8 マウスアウトでツールチップ要素を削除