Skip to content

Instantly share code, notes, and snippets.

View may88seiji's full-sized avatar

may88seiji

  • freelance
  • Tokyo Japan
View GitHub Profile
font-face {
font-family: 'icomoon';
src: url('fonts/icomoon.eot?9s40wt');
src: url('fonts/icomoon.eot?9s40wt#iefix') format('embedded-opentype'),
url('fonts/icomoon.ttf?9s40wt') format('truetype'),
url('fonts/icomoon.woff?9s40wt') format('woff'),
url('fonts/icomoon.svg?9s40wt#icomoon') format('svg');
font-weight: normal;
font-style: normal;
}
@may88seiji
may88seiji / base.scss
Created September 28, 2017 09:43
counterを利用した自動ナンバリング http://design-studio-f.com/blog/css-counter-automatic-numbering/
body {
counter-reset: number 0; /* number のカウンタを 0 にセット */
}
h1:before {
counter-increment: number 1; /* number カウンタの増加数をセット */
content: counter(number) " "; /* 表示形式を指定 */
}
@may88seiji
may88seiji / example01.js
Last active September 11, 2019 07:25
配列にfor...inはダメと言うけれど、 ref: https://qiita.com/may88seiji/items/2e8fec8391fea0a17dbc
for(仮変数 in 連想配列){
ループ内で実行する命令
}
@may88seiji
may88seiji / style.scss
Last active April 27, 2017 12:29
scssのネストの方法
&:first-child{
.l-section:nth-child(odd) &{
float: left;
margin-top: 60px;
background-color: darkcyan;
/** * mobile */
@include mobile {
margin-top: 0;
float: none;
}
<!--slide-->
<div id="slide">
<ul>
<?php if(have_rows('mv_slide_repeat')): ?>
<?php $is_first = true;?>
<?php while(have_rows('mv_slide_repeat')): the_row(); ?>
<li>
<div class="hidden-xs slide_img<?php if($is_first) echo " active"; ?>" style="background-image: url(<?php the_sub_field('img_mv_pc'); ?>);background-size: cover;"></div>
<div class="visible-xs slide_img<?php if($is_first) echo " active"; ?>" style="background-image: url(<?php the_sub_field('img_mv_sp'); ?>);background-size: cover;"></div>
</li>