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.

+ add another resource

You're using npm packages, so we've auto-selected Babel for you here, which we require to process imports and make it all work. If you need to use a different JavaScript preprocessor, remove the packages in the npm tab.

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

Use npm Packages

We can make npm packages available for you to use in your JavaScript. We use webpack to prepare them and make them available to import. We'll also process your JavaScript with Babel.

⚠️ This feature can only be used by logged in users.

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.

            
              <h3>オリジナル</h3>
<div id="sns-group-top" class="sns-group sns-group-top">
		<div class="sns-buttons sns-buttons-pc">
				<p class="sns-share-msg">シェアする</p>
				<ul class="snsb snsb-balloon clearfix">
						<li class="balloon-btn twitter-balloon-btn">
								<span class="balloon-btn-set">
        <span class="arrow-box">
          <a href="//twitter.com/search?q=http%3A%2F%2Fwp-simplicity.com%2Fsuport%2Ftopic%2Fios8-4-1%25e3%2581%25a72%25e3%2582%25af%25e3%2583%25aa%25e3%2583%2583%25e3%2582%25af%25e3%2581%2597%25e3%2581%25aa%25e3%2581%2584%25e3%2581%25a8%25e3%2583%25aa%25e3%2583%25b3%25e3%2582%25af%25e3%2581%258c%25e9%25a3%259b%25e3%2581%25b9%25e3%2581%25aa%25e3%2581%2584%25e5%2595%258f%25e9%25a1%258c%2F" target="blank" class="arrow-box-link twitter-arrow-box-link" rel="nofollow">
            <span class="social-count twitter-count">0</span>
								</a>
								</span>
								<a href="//twitter.com/share?text=iOS8.4.1%E3%81%A72%E3%82%AF%E3%83%AA%E3%83%83%E3%82%AF%E3%81%97%E3%81%AA%E3%81%84%E3%81%A8%E3%83%AA%E3%83%B3%E3%82%AF%E3%81%8C%E9%A3%9B%E3%81%B9%E3%81%AA%E3%81%84%E5%95%8F%E9%A1%8C&amp;url=http%3A%2F%2Fwp-simplicity.com%2Fsuport%2Ftopic%2Fios8-4-1%25e3%2581%25a72%25e3%2582%25af%25e3%2583%25aa%25e3%2583%2583%25e3%2582%25af%25e3%2581%2597%25e3%2581%25aa%25e3%2581%2584%25e3%2581%25a8%25e3%2583%25aa%25e3%2583%25b3%25e3%2582%25af%25e3%2581%258c%25e9%25a3%259b%25e3%2581%25b9%25e3%2581%25aa%25e3%2581%2584%25e5%2595%258f%25e9%25a1%258c%2F&amp;related=MrYhira"
								target="blank" class="balloon-btn-link twitter-balloon-btn-link" rel="nofollow">
										<span class="icon-twitter"></span>
								</a>
								</span>
						</li>
						<li class="balloon-btn facebook-balloon-btn">
								<span class="balloon-btn-set">
        <span class="arrow-box">
          <a href="//www.facebook.com/sharer/sharer.php?u=//wp-simplicity.com/suport/topic/ios8-4-1%e3%81%a72%e3%82%af%e3%83%aa%e3%83%83%e3%82%af%e3%81%97%e3%81%aa%e3%81%84%e3%81%a8%e3%83%aa%e3%83%b3%e3%82%af%e3%81%8c%e9%a3%9b%e3%81%b9%e3%81%aa%e3%81%84%e5%95%8f%e9%a1%8c/&amp;t=iOS8.4.1で2クリックしないとリンクが飛べない問題" target="blank" class="arrow-box-link facebook-arrow-box-link" rel="nofollow">
            <span class="social-count facebook-count">0</span>
								</a>
								</span>
								<a href="//www.facebook.com/sharer/sharer.php?u=//wp-simplicity.com/suport/topic/ios8-4-1%e3%81%a72%e3%82%af%e3%83%aa%e3%83%83%e3%82%af%e3%81%97%e3%81%aa%e3%81%84%e3%81%a8%e3%83%aa%e3%83%b3%e3%82%af%e3%81%8c%e9%a3%9b%e3%81%b9%e3%81%aa%e3%81%84%e5%95%8f%e9%a1%8c/&amp;t=iOS8.4.1%E3%81%A72%E3%82%AF%E3%83%AA%E3%83%83%E3%82%AF%E3%81%97%E3%81%AA%E3%81%84%E3%81%A8%E3%83%AA%E3%83%B3%E3%82%AF%E3%81%8C%E9%A3%9B%E3%81%B9%E3%81%AA%E3%81%84%E5%95%8F%E9%A1%8C"
								target="blank" class="balloon-btn-link facebook-balloon-btn-link" rel="nofollow">
										<span class="icon-facebook"></span>
								</a>
								</span>
						</li>
						<li class="balloon-btn googleplus-balloon-btn">
								<span class="balloon-btn-set">
        <span class="arrow-box">
          <a href="//plus.google.com/share?url=http%3A%2F%2Fwp-simplicity.com%2Fsuport%2Ftopic%2Fios8-4-1%25e3%2581%25a72%25e3%2582%25af%25e3%2583%25aa%25e3%2583%2583%25e3%2582%25af%25e3%2581%2597%25e3%2581%25aa%25e3%2581%2584%25e3%2581%25a8%25e3%2583%25aa%25e3%2583%25b3%25e3%2582%25af%25e3%2581%258c%25e9%25a3%259b%25e3%2581%25b9%25e3%2581%25aa%25e3%2581%2584%25e5%2595%258f%25e9%25a1%258c%2F" onclick="javascript:window.open(this.href, '', 'menubar=no,toolbar=no,resizable=yes,scrollbars=yes,height=600,width=600');return false;" target="blank" class="arrow-box-link googleplus-arrow-box-link" rel="nofollow">
            <span class="social-count googleplus-count">0</span>
								</a>
								</span>
								<a href="//plus.google.com/share?url=http%3A%2F%2Fwp-simplicity.com%2Fsuport%2Ftopic%2Fios8-4-1%25e3%2581%25a72%25e3%2582%25af%25e3%2583%25aa%25e3%2583%2583%25e3%2582%25af%25e3%2581%2597%25e3%2581%25aa%25e3%2581%2584%25e3%2581%25a8%25e3%2583%25aa%25e3%2583%25b3%25e3%2582%25af%25e3%2581%258c%25e9%25a3%259b%25e3%2581%25b9%25e3%2581%25aa%25e3%2581%2584%25e5%2595%258f%25e9%25a1%258c%2F"
								onclick="javascript:window.open(this.href, '', 'menubar=no,toolbar=no,resizable=yes,scrollbars=yes,height=600,width=600');return false;" target="blank" class="balloon-btn-link googleplus-balloon-btn-link" rel="nofollow">
										<span class="icon-googleplus"></span>
								</a>
								</span>
						</li>
						<li class="balloon-btn hatena-balloon-btn">
								<span class="balloon-btn-set">
        <span class="arrow-box">
          <a href="//b.hatena.ne.jp/entry/wp-simplicity.com/suport/topic/ios8-4-1%e3%81%a72%e3%82%af%e3%83%aa%e3%83%83%e3%82%af%e3%81%97%e3%81%aa%e3%81%84%e3%81%a8%e3%83%aa%e3%83%b3%e3%82%af%e3%81%8c%e9%a3%9b%e3%81%b9%e3%81%aa%e3%81%84%e5%95%8f%e9%a1%8c/" target="blank" class="arrow-box-link hatena-arrow-box-link" rel="nofollow">
            <span class="social-count hatebu-count">0</span>
								</a>
								</span>
								<a href="//b.hatena.ne.jp/add?mode=confirm&amp;url=//wp-simplicity.com/suport/topic/ios8-4-1%e3%81%a72%e3%82%af%e3%83%aa%e3%83%83%e3%82%af%e3%81%97%e3%81%aa%e3%81%84%e3%81%a8%e3%83%aa%e3%83%b3%e3%82%af%e3%81%8c%e9%a3%9b%e3%81%b9%e3%81%aa%e3%81%84%e5%95%8f%e9%a1%8c/&amp;title=iOS8.4.1%E3%81%A72%E3%82%AF%E3%83%AA%E3%83%83%E3%82%AF%E3%81%97%E3%81%AA%E3%81%84%E3%81%A8%E3%83%AA%E3%83%B3%E3%82%AF%E3%81%8C%E9%A3%9B%E3%81%B9%E3%81%AA%E3%81%84%E5%95%8F%E9%A1%8C"
								target="blank" class="balloon-btn-link hatena-balloon-btn-link" rel="nofollow">
										<span class="icon-hatena"></span>
								</a>
								</span>
						</li>
						<li class="balloon-btn pocket-balloon-btn">
								<span class="balloon-btn-set">
        <span class="arrow-box">
          <a href="//getpocket.com/edit?url=//wp-simplicity.com/suport/topic/ios8-4-1%e3%81%a72%e3%82%af%e3%83%aa%e3%83%83%e3%82%af%e3%81%97%e3%81%aa%e3%81%84%e3%81%a8%e3%83%aa%e3%83%b3%e3%82%af%e3%81%8c%e9%a3%9b%e3%81%b9%e3%81%aa%e3%81%84%e5%95%8f%e9%a1%8c/" target="blank" class="arrow-box-link pocket-arrow-box-link" rel="nofollow">
            <span class="social-count pocket-count">0</span>
								</a>
								</span>
								<a href="//getpocket.com/edit?url=//wp-simplicity.com/suport/topic/ios8-4-1%e3%81%a72%e3%82%af%e3%83%aa%e3%83%83%e3%82%af%e3%81%97%e3%81%aa%e3%81%84%e3%81%a8%e3%83%aa%e3%83%b3%e3%82%af%e3%81%8c%e9%a3%9b%e3%81%b9%e3%81%aa%e3%81%84%e5%95%8f%e9%a1%8c/"
								target="blank" class="balloon-btn-link pocket-balloon-btn-link" rel="nofollow">
										<span class="icon-pocket"></span>
								</a>
								</span>
						</li>
						<li class="balloon-btn evernote-balloon-btn">
								<span class="balloon-btn-set">
        <span class="arrow-box">
          <a href="#" onclick="Evernote.doClip({url:'//wp-simplicity.com/suport/topic/ios8-4-1%e3%81%a72%e3%82%af%e3%83%aa%e3%83%83%e3%82%af%e3%81%97%e3%81%aa%e3%81%84%e3%81%a8%e3%83%aa%e3%83%b3%e3%82%af%e3%81%8c%e9%a3%9b%e3%81%b9%e3%81%aa%e3%81%84%e5%95%8f%e9%a1%8c/',
    providerName:'Simplicity',
    title:'iOS8.4.1で2クリックしないとリンクが飛べない問題',
    contentId:'the-content',
    }); return false;" target="blank" class="arrow-box-link evernote-arrow-box-link" rel="nofollow">
            CLIP!
          </a>
        </span>
								<a href="#" onclick="Evernote.doClip({url:'//wp-simplicity.com/suport/topic/ios8-4-1%e3%81%a72%e3%82%af%e3%83%aa%e3%83%83%e3%82%af%e3%81%97%e3%81%aa%e3%81%84%e3%81%a8%e3%83%aa%e3%83%b3%e3%82%af%e3%81%8c%e9%a3%9b%e3%81%b9%e3%81%aa%e3%81%84%e5%95%8f%e9%a1%8c/',
    providerName:'Simplicity',
    title:'iOS8.4.1で2クリックしないとリンクが飛べない問題',
    contentId:'the-content',
    }); return false;" target="blank" class="balloon-btn-link evernote-balloon-btn-link" rel="nofollow">
										<span class="icon-evernote"></span>
								</a>
								</span>
						</li>
						<li class="balloon-btn feedly-balloon-btn">
								<span class="balloon-btn-set">
        <span class="arrow-box">
          <a href="//feedly.com/index.html#subscription%2Ffeed%2F//wp-simplicity.com/feed/" target="blank" class="arrow-box-link feedly-arrow-box-link" rel="nofollow">
            <span class="social-count feedly-count">286</span>
								</a>
								</span>
								<a href="//feedly.com/index.html#subscription%2Ffeed%2F//wp-simplicity.com/feed/" target="blank" class="balloon-btn-link feedly-balloon-btn-link" rel="nofollow">
										<span class="icon-feedly"></span>
								</a>
								</span>
						</li>
				</ul>
		</div>
</div>
<hr>
<h2>俺ならこうするシリーズ@codepen</h2>
<h3>公式デフォルトの改造(flex版)</h3>
<div class="test">
		<ul>
			<li>
				<a href="#">
					<span class="icon twitter"><i class="fa fa-twitter"></i></span>
				</a>
				<a href="#">
					<span class="count">0</span>
				</a>
			</li>
				<li>
					<a href="#">
						<span class="icon facebook"><i class="fa fa-facebook"></i></span>
					</a>
					<a href="#">
						<span class="count">0</span>
					</a>
			</li>
				<li>
					<a href="#">
						<span class="icon google-plus">
							<i class="fa fa-google-plus"></i>
						</span>
					</a>
					<a href="#">
						<span class="count">0</span>
					</a>
			</li>
				<li>
					<a href="#">
						<span class="icon hatena"></span>
					</a>
					<a href="#">
						<span class="count">0</span>
					</a>
			</li>
				<li>
					<a href="#">
						<span class="icon pocket">
							<i class="fa fa-get-pocket"></i>
						</span>
					</a>
					<a href="#">
						<span class="count">0</span>
					</a>
			</li>
				<li>
					<a href="#">
						<span class="icon evernote"></span>
					</a>
					<a href="#">
						<span class="count">Clip!</span>
					</a>
			</li>
				<li>
					<a href="#">
						<span class="icon feedly"></span>
					</a>
					<a href="#">
						<span class="count">286</span>
					</a>
			</li>
		</ul>
</div>
<div class="tes_mes">
<ul>
	<li>font awesomeで読み込めるアイコンだけ入れてみました</li>
	<li>表示をdisplay:flexにしました
		<ul>
			<li>これにより、もちろんレスポンシブ対応</li>
		</ul>
	</li>
	<li>アイコン部分のhoverにopacityを使わず擬似要素をrgbaにてopacityっぽい処理に変更
		<ul>
			<li>これにより、iOS8.4.1あたりのhoverにopacityが仕込んであると2click必要な場面をなんとかしてみました。イケてるかは知りません(笑)</li>
			<li>透過っぽい感じにさせるために、rgbaの値は記事の背景色と同じにすると良いかと思います。</li>
		</ul>
	</li>
	<li>アイコン、カウント部分の高さはliで決めます
		<ul>
			<li>アイコン部、カウント部それぞれに高さを設定せず、その親であるliに高さを入れることで柔軟に対応できます。またliの高さを調節し、ちょっと触るだけで以下のバルーンタイプのようなものもすぐに作成できます。</li>
		</ul>
			</li>
</ul>
</div>

<h3>バルーンタイプ</h3>
<div class="test2">
		<ul>
			<li>
				<a href="#">
					<span class="icon twitter"><i class="fa fa-twitter"></i></span>
				</a>
				<a href="#">
					<span class="count">0</span>
				</a>
			</li>
				<li>
					<a href="#">
						<span class="icon facebook"><i class="fa fa-facebook"></i></span>
					</a>
					<a href="#">
						<span class="count">0</span>
					</a>
			</li>
				<li>
					<a href="#">
						<span class="icon google-plus">
							<i class="fa fa-google-plus"></i>
						</span>
					</a>
					<a href="#">
						<span class="count">0</span>
					</a>
			</li>
				<li>
					<a href="#">
						<span class="icon hatena"></span>
					</a>
					<a href="#">
						<span class="count">0</span>
					</a>
			</li>
				<li>
					<a href="#">
						<span class="icon pocket">
							<i class="fa fa-get-pocket"></i>
						</span>
					</a>
					<a href="#">
						<span class="count">0</span>
					</a>
			</li>
				<li>
					<a href="#">
						<span class="icon evernote"></span>
					</a>
					<a href="#">
						<span class="count">Clip!</span>
					</a>
			</li>
				<li>
					<a href="#">
						<span class="icon feedly"></span>
					</a>
					<a href="#">
						<span class="count">286</span>
					</a>
			</li>
		</ul>
</div>

<div class="tes_mes">
	<ul>
		<li>上のタイプ?からの変更点は次の通り
			<ul>
				<li>ul liのflex-flow: row → column</li>
				<li>同 height:20px → 80px</li>
				<li>同 a にfirst-childがorder:2、last-childはorder:1にしてアイコンとカウントの順番を入れ替え</li>
				<li>アイコン、カウントの縦ぞろえのためline-height追加</li>
				<li>カウントの矢印位置変更のため、::after、::beforeの数値変更</li>
			</ul>
		</li>
	</ul>
</div>

<h3>ulのclass切り替えテスト用</h3>
<div class="test3">
		<ul>
			<li>
				<a href="#">
					<span class="icon twitter"><i class="fa fa-twitter"></i></span>
				</a>
				<a href="#">
					<span class="count">0</span>
				</a>
			</li>
				<li>
					<a href="#">
						<span class="icon facebook"><i class="fa fa-facebook"></i></span>
					</a>
					<a href="#">
						<span class="count">0</span>
					</a>
			</li>
				<li>
					<a href="#">
						<span class="icon google-plus">
							<i class="fa fa-google-plus"></i>
						</span>
					</a>
					<a href="#">
						<span class="count">0</span>
					</a>
			</li>
				<li>
					<a href="#">
						<span class="icon hatena"></span>
					</a>
					<a href="#">
						<span class="count">0</span>
					</a>
			</li>
				<li>
					<a href="#">
						<span class="icon pocket">
							<i class="fa fa-get-pocket"></i>
						</span>
					</a>
					<a href="#">
						<span class="count">0</span>
					</a>
			</li>
				<li>
					<a href="#">
						<span class="icon evernote"></span>
					</a>
					<a href="#">
						<span class="count">Clip!</span>
					</a>
			</li>
				<li>
					<a href="#">
						<span class="icon feedly"></span>
					</a>
					<a href="#">
						<span class="count">286</span>
					</a>
			</li>
		</ul>
</div>

<div class="tes_mes">
	<ul>
		<li>ラジオボタンでタイプ変更できます
		<ul>
			<li>ulのクラスを付け替えるだけでok</li>
			<li>このテストではjQueryでやってますが、phpでulのclassを変更するだけ</li>
			</ul>
		</li>
		<li>2つ目のテスト(バルーンタイプ)とは一部変更があります
			<ul>
				<li>normalタイプでカウント部にtopをつけていたため、balloonタイプではそれを打ち消すためのtop: initial;が仕込んであります</li>
			</ul>
		</li>
		<li>ulにつけるclassの変更部分は各パーツのサイズ(width,height)・位置(top,left,bottom)、矢印の位置(主に擬似要素)だけです</li>
		<li>おそらくhtmlに何も追加しないで色々なデザインが可能になると思います</li>
	</ul>
</div>
            
          
!
            
              *, *::before, *::after {
	box-sizing: border-box;
}

body {
	//background-color: #ccc;
}

.test {
	ul {
		display:flex;
		flex-flow: row wrap;
		justify-content: flex-start;
		list-style: none;
		margin: 0;
		padding: 0;
		
		li{
			position: relative;
			width: 90px;
			height: 20px;
			margin-right: 10px;
			margin-bottom: 10px;
			display: flex;
			flex-flow: row wrap;
			justify-content: space-between;
			
			&:last-child {
				margin-right: 0;
			}
			
			a {
				text-decoration: none;
				//width: 100%;
				//height: 100%;
			}
			
			span {
				position: relative;
				display: block;
				font-size: 14px;
				text-align: center;
			}
			
			.icon {
				width: 30px;
				height: 100%;
				border-radius: 3px;
				border: 1px solid #bbb;
				color: #fff;
				position: relative;
				
				&:hover::before {
					content:"";
					position: absolute;
					width: 100%;
					height: 100%;
					top: 0;
					left: 0;
					background-color: rgba(255,255,255,.5);
				}
				
			}
			.count {
				width: 56px;
				height: 100%;
				border:1px solid #bbb;
				border-radius: 3px;
				background-color: #fff;
				font-family: Arial;
				font-weight: bold;
				line-height: 17px;
				color: #777;
				
				&::before,
				&::after {
					content: "";
					position: absolute;
					top: 50%;
					left: 0%;
					width: 0;
					height: 0;
					border-style: solid;
					
					//z-index: 5;
					pointer-events: none;
				}
				
				&::after {
					transform: translate(-3px,-50%);
					border-color: transparent #fff transparent transparent;
					border-width: 4px 8px 4px 0;
				}
				
				&::before {
					transform: translate(-5px,-50%);
					border-color: transparent #ccc transparent transparent;
					border-width: 2px 4px 2px 0;
				}
				
			}
			
		} //li end
		
	} // ul end
}

.icon {
	&.twitter { background-color: #55ACEE; }
	&.facebook { background-color: #3C5A99; }
	&.google-plus { background-color: #DD4B39; }
	&.hatena { background-color: #3C7DD1; }
	&.pocket { background-color: #EE4257; }
	&.evernote { background-color: #51B125; }
	&.feedly { background-color: #87BD33; }
}

.test2 {
	ul {
		display:flex;
		flex-flow: row wrap;
		justify-content: flex-start;
		list-style: none;
		margin: 0;
		padding: 0;
		
		li{
			position: relative;
			width: 90px;
			height: 80px;
			margin-right: 10px;
			margin-bottom: 10px;
			display: flex;
			flex-flow: column wrap;
			justify-content: space-between;
			
			&:last-child {
				margin-right: 0;
			}
			
			a {
				text-decoration: none;
				
				&:first-child {
					order: 2;
				}
				&:last-child {
					order: 1;
				}
			}
			
			span {
				position: relative;
				display: block;
				font-size: 14px;
				text-align: center;
			}
			
			.icon {
				width: 100%;
				height: 35px;
				border-radius: 3px;
				border: 1px solid #bbb;
				color: #fff;
				position: relative;
				line-height: 35px;
				
				&:hover::before {
					content:"";
					position: absolute;
					width: 100%;
					height: 100%;
					top: 0;
					left: 0;
					background-color: rgba(255,255,255,.5);
				}
				
			}
			.count {
				width: 100%;
				height: 35px;
				border:1px solid #bbb;
				border-radius: 3px;
				background-color: #fff;
				font-family: Arial;
				font-weight: bold;
				line-height: 33px;
				color: #777;
				
				&::before,
				&::after {
					content: "";
					position: absolute;
					bottom: 0%;
					left: 50%;
					width: 0;
					height: 0;
					border-style: solid;
					
					//z-index: 5;
					pointer-events: none;
				}
				
				&::after {
					transform: translate(-50%,3px);
					border-color: #fff transparent transparent transparent;
					border-width: 8px 4px 0 4px ;
				}
				
				&::before {
					transform: translate(-50%,5px);
					border-color: #ccc transparent transparent transparent;
					border-width: 4px 2px 0 2px;
				}
				
			}
			
		} //li end
		
	} // ul end
}

/*
*		ulにclass付け替えだけで表示切り替え
*/
.test3 {
	ul {
		display:flex;
		flex-flow: row wrap;
		justify-content: flex-start;
		list-style: none;
		margin: 0;
		padding: 0;
		
		li{
			position: relative;
			width: 90px;
			height: 20px;
			margin-right: 10px;
			margin-bottom: 10px;
			display: flex;
			flex-flow: row wrap;
			justify-content: space-between;
			
			&:last-child {
				margin-right: 0;
			}
			
			a {
				text-decoration: none;
				//width: 100%;
				//height: 100%;
			}
			
			span {
				position: relative;
				display: block;
				font-size: 14px;
				text-align: center;
			}
			
			.icon {
				width: 30px;
				height: 100%;
				border-radius: 3px;
				border: 1px solid #bbb;
				color: #fff;
				position: relative;
				
				&:hover::before {
					content:"";
					position: absolute;
					width: 100%;
					height: 100%;
					top: 0;
					left: 0;
					background-color: rgba(255,255,255,.5);
				}
				
			}
			.count {
				width: 56px;
				height: 100%;
				border:1px solid #bbb;
				border-radius: 3px;
				background-color: #fff;
				font-family: Arial;
				font-weight: bold;
				line-height: 17px;
				color: #777;
				
				&::before,
				&::after {
					content: "";
					position: absolute;
					top: 50%;
					left: 0%;
					width: 0;
					height: 0;
					border-style: solid;
					pointer-events: none;
				}
				
				&::after {
					transform: translate(-3px,-50%);
					border-color: transparent #fff transparent transparent;
					border-width: 4px 8px 4px 0;
				}
				
				&::before {
					transform: translate(-5px,-50%);
					border-color: transparent #ccc transparent transparent;
					border-width: 2px 4px 2px 0;
				}
				
			}
			
		} //li end
		
		&.balloon {
			li {
				height: 80px;
				flex-flow: column wrap;
			}
			
			a {
				&:first-child {
					order: 2;
				}
				&:last-child {
					order: 1;
				}
				
				.icon {
					width: 100%;
					height: 35px;
					line-height: 35px;
				}
				.count {
					width: 100%;
					height: 35px;
					line-height: 33px;

					&::before,
					&::after {
						top: initial;
						bottom: 0;
						left: 50%;
					}

					&::after {
						transform: translate(-50%,3px);
						border-color: #fff transparent transparent transparent;
						border-width: 8px 4px 0 4px ;
					}

					&::before {
						transform: translate(-50%,5px);
						border-color: #ccc transparent transparent transparent;
						border-width: 4px 2px 0 2px;
					}

				}
			}
		}
		
		&.viral {
			justify-content: space-between;
			
			.twitter {
				i {
					&::after {
						margin-left: 0.5rem;
						content: "twitter";
					}
				}
			}
			.facebook {
				i {
					&::after {
						margin-left: 0.5rem;
						content: "facebook";
					}
				}
			}
			.google-plus {
				i {
					&::after {
						margin-left: 0.5rem;
						content: "google+";
					}
				}
			}
			.hatena {
				i {
					&::after {
						margin-left: 0.5rem;
						content: "hatebu";
					}
				}
			}
			.pocket {
				i {
					&::after {
						margin-left: 0.5rem;
						content: "pocket";
					}
				}
			}
			.evernote {
				i {
					&::after {
						margin-left: 0.5rem;
						content: "evernote";
					}
				}
			}
			.feedly {
				i {
					&::after {
						margin-left: 0.5rem;
						content: "feedly";
					}
				}
			}
			
			li {
				height: 55px;
				position: relative;
				width: initial;
				min-width: 120px;
				display: block;
				margin-right: 0;
				margin-bottom: 0;
				padding: 3px;
				flex: 1 1 auto;
				
				@media screen and (max-width: 440px){
					width: 100%;
				}
				
				.icon {
					width: 100%;
					height: 100%;
					
					i{
						top: 50%;
						position: absolute;
						top: 10px;
						left: 50%;
						transform: translate(-2.5em,0);
					}
				}
				.count {
					position: absolute;
					width: 100%;
					height: 14px;
					top: initial;
					right: 0;
					bottom: 10px;
					line-height: 14px;
					border: medium none;
					background-color: transparent;
					text-align: right;
					color: #FFF;
					padding-right: 10px;
					
					&::before,
					&::after {
						content: "";
						border: none;
					}
				}
			}
		}
		
	} // ul end
}

.tes_mes {
	padding: 20px 0 0 0;
	ul {
		list-style: none;
		border-left: 3px solid #999;
		margin: 0 0 0 1rem;
		padding: 0 16px 0;
		
		li {
			font-size: 16px;
			margin: 0 0 14px 0;
			position: relative;
			
			&::before {
				content: "";
				width: 14px;
				height: 14px;
				background-color: #999;
				border-radius: 50%;
				position: absolute;
				left: -1rem + -0.5rem;
			}
			
			ul {
				padding: 0;
				margin: 5px 0 10px 14px;
				border: none;
				
				li {
					//list-style-type: square;
					font-size: 14px;
					color: #555;
					margin: 0 0 5px 0; 
					
					&::before {
						display: none;
					}
				}
			}
		}
	}
}

hr {
	display: block;
	margin: 10px 0;
}

h2 {
	display:block;
	margin: 5px 0;
}
h3 {
	display: block;
	margin: 30px 0 5px;
	
	&:nth-of-type(1),
	&:nth-of-type(2),{
		margin: 0 0 5px;
	}
}
            
          
!
            
              jQuery(function($) {

		$(function() {

				//ul切り替え用のラジオボタン設置
				var type = ["normal", "balloon", "viral"],
						checked;
				for (var i = 0; i < type.length; i++) {
						(type[i] == "normal") ? checked = "checked": checked = "";

						$(".test3").prepend("<input name='type' type='radio' value='" + type[i] + "' " + checked + ">" + type[i]);
				}

				//テスト用のulにクラスを付け替える
				$(".test3 input[name='type']").on("change", function() {
						var t = $(this).val();
						//console.log(t);
						switch (t) {
								case "viral":
										$(".test3 ul").removeClass().addClass("viral");
										break;
								case "balloon":
										$(".test3 ul").removeClass().addClass("balloon");
										break;
								case "normal":
										$(".test3 ul").removeClass();
										break;
						}
				});

				/*
				 *		カウンタのスピンアイコンはajax部分でajaxが始まる前に
				 *		例えば以下のようにセット
				 */
				var data = []; //擬似データ作成用
				$(".test3 .count").each(function() {
						var originalCount = $(this).text();//←は擬似ajax用
						data.push(originalCount);//←は擬似ajax用
						
						$(this).html("<i class='fa fa-spinner fa-pulse'></i>");
				});
			
			/*
			*		オリジナルjavascript.jsのjQuery('selector').text(count || 0);
			*		の部分でjQuery('.count').text(count || 0)で書き換わります。
			*/

				/*
				 *		仮に3秒後にajaxの返信があったとして
				 *		以下はそれを擬似的に再現してます
				 */
				var dat = [];
				for (var i = 0; i < data.length; i++) {
						dat.push(i);
				}
				dat.sort(
						function() {
								return Math.random() - 0.5;
						}
				);

				setTimeout(function() {
						$.each(dat, function(i, value) {
								//console.log(dat[value]);
								$(".test3 .count")
										.eq(dat[value])
										.empty()
										.delay(i * 200)
										.queue(function() {
												$(this).append(data[dat[value]]);
										});
						})
				}, 3000);

		});

});
            
          
!
999px
🕑 One or more of the npm packages you are using needs to be built. You're the first person to ever need it! We're building it right now and your preview will start updating again when it's ready.
Loading ..................

Console