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.

            
              <h1>AlphaPicker</h1>
<p>リンクを非透過部分のみに設定するサンプル</p>
<p><a href="https://github.com/" title="GitHub" target="_blank"><img src="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAfQAAAH0BAMAAAA5+MK5AAAAMFBMVEX///8zMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzOGvfDjAAAAD3RSTlMAESIzRFVmd4iZqrvM3e5GKvWZAAAQFklEQVR4XuzPMQ2AMBAAQBIQgCaSekBAxTxaMEDykhgqoWxMCCDNnYOb/ggAAAAAAAAAWEocmf115xV1G75dIlv/llHXUdvzfj7k3HFklGEcB/Dfe+3WWqnDrEUyKKroBQyppZVl6CIUsgqkMAWIui1bLlWbaQS2RTRUS0JauioS4UJVhEuJ1vCy2tq6u/cboZed2+3ufX/v83v2fP4/PH7P+/x+7/e993Uwv0cXmmnRiRy8jQX51GPTYrL+koOFe3iMFovWOyjTRPfiWHgKFcj2xEhzTSlUKKd35TfchQ8/TuvbzS7Dp1c2aak1A9/cAdJPdBCBGI+TZpoceEwqfOQKAvTRJm3UpxGo3CnSxF4E7hrpwDoLBh9iGjTzQbCYb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jwJ+v3xuy0A88GvuN1qnR+S0PN/wak6BfOkm17JYg9IZf69ZkWwx637fb2bguBb3h3bF3WJeB3mcwuRteEYHe4DBqHn9HAHqfydvwdzV29AaXP/fohnpcl382aeJM+dLxnbDhf3+qXvjsDzpa+6vDN3ht2e+9fmPzeVXY3Lz6/fc9mzyi9wVZdGPR+Q3LL0lFP+ByZsejC3SpPy8T/TbbVTN4dIlX75xjQ+e3aQ/loZ9wWXXzozeUJ33eBT3wgP435Usll0hXp0c3lVF6fVQW+hvKo0IudP5bFCuxHPSkobzqWTnod5RfFVpS0AeB8qx5Kejbyruek4H+tvKvwk0J6KeBYtB8zI+ebCsWPcOPfkcxKeRGP1FcKke86OO6YtMqL/p1xagXONH/oDhVCJnQjcOn3OmORzcTnVlVLvSmYtcnedBvKQF6iQP970qCCqFfdBPi+FVs+0Yfrishmov8ohs7AH5VY5/oSVMJ0qpP9OtKlC74Q/+xEqZP+EK/pcTpc37Q31RKNjse3ZCLZEeiV5Dk9LpA9tZNhBPLHmPR5ZMbrT7OHqBcC5LrSrQqHYzJ4OM23CNwQ5X+as0TUKV7UP9Xe3dog0AUA2C44cIM2BuBUbAwBgOwAchTWJZhAhwWdxNcwvnKCmjyfTP0maZ5f/y9zbX+TXkOpr7G6OCU9kjlzdcjmti9UzeiVCBZztHGcEu1kMKt0mcfnRzneqH5krqnPWzv66BOxSjv+nCeh/gZAAAAAAAAAOALGJiZaBgWqpIAAAAASUVORK5CYII=
  " alt="" /></a></p>
            
          
!
            
              body {
  background: url(data:image/gif;base64,R0lGODlhEAAQAIAAAN/f3////yH5BAAHAP8ALAAAAAAQABAAAAIfjG+gq4jM3IFLJgpswNly/XkcBpIiVaInlLJr9FZWAQA7);
  color: #333;
	text-align: center;
}

h1 {
	font: 48px/1.6 "Myriad Pro", sans-serif;
}

img {
	border: 1px solid #999;
}

.alphapicker {
	cursor: default;
}
.hover {
	cursor: pointer;
}
            
          
!
            
              /*
 * AlphaPicker.js
 * https://github.com/escapism/AlphaPicker
 *
 */

window.addEventListener("load", function() {
	var a = document.getElementsByTagName("a")[0], // a要素を取得
		img = a.getElementsByTagName("img")[0], // img要素を取得
		url = a.href, // リンクURLを取得
		alpha;
	
	try {
		/* Alphapickerにimg要素を渡し、Alphapickerオブジェクトを取得 */
		alpha = AlphaPicker(img);
	}
	catch(e) {
		/* エラー処理 */
		console.log(e.name + ":" + e.message);
		return;
	}
	
	/* a要素のイベントを無効にします */
	a.className = "alphapicker";
	a.addEventListener("click", function(e) {
		e.preventDefault();
	}, false);
	
	/* Alphapickerオブジェクトのメソッドでマウスオーバーとリンクを設定します */
	alpha.mousemove(function(e) {
		/* イベントオブジェクトのalphaプロパティに、マウス座標のアルファ値が入っています */
		if(e.alpha) {
			this.className = "hover";
		} else {
			this.className = "";
		}
	}).mouseout(function(e) {
		this.className = "";
	}).click(function(e) {
		if(e.alpha) {
			window.open(url);
		}
	});
}, false);
            
          
!
999px
Loading ..................

Console