This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
.fraction{ | |
display: inline-block; | |
vertical-align: middle; | |
text-align: center; | |
} | |
.fraction_n,.fraction_d{ | |
display: block; | |
} | |
.fraction_n{ | |
border-bottom: 1px solid #333; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#demobox{ | |
display: flex; | |
justify-content: center; | |
align-items: center; | |
position: relative; | |
width: 100%; | |
height: 200px; | |
border: 1px solid #ddd; | |
} | |
#demochild{ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<!-- headタグ内 / in <head> --> | |
<link rel="path/to/simple-img-modal.css"> | |
<!-- bodyタグの終了直前 / before </body> --> | |
<script src="path/to/simple-img-modal.js"></script> | |
<script> | |
const modal = new simpleImgModal(); | |
</script> | |
<!-- 画像を置きたい場所 / in your html --> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
.s-highlight{ | |
background-color:yellow; | |
} | |
.s-hide{ | |
display: none; | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
const bool = Math.random()<0.5; //bool=true or bool=false |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
function randomMN(m,n){ | |
const d = Math.max(m,n)-Math.min(m,n); | |
return Math.floor(Math.random()*(d+1)+Math.min(m,n)); | |
} | |
// randomMN(3,9) => 3~9(int) | |
// randomMN(-2,4) => -2~4(int) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
const date = new Date(); //現在の日時よりDateオブジェクトを生成 | |
const yyyy = date.getFullYear(); //年 | |
const MM = date.getMonth()+1; //月 | |
const dd = date.getDate(); //日 | |
const hh = date.getHours(); //時 | |
const mm = date.getMinutes(); //分 | |
const dow_list = ['日','月','火','水','木','金','土']; | |
const dow = dow_list[date.getDay()]; //曜日 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<!-- 左カラム(固定幅)、右カラム(可変幅) --> | |
<div class="parent"> | |
parent | |
<table class="sample1"> | |
<tr> | |
<td class="lc">吾輩は猫である</td> | |
<td class="rc">吾輩は猫である。名前はまだ無い。<br>どこで生れたかとんと見当がつかぬ。何でも薄暗いじめじめした所でニャーニャー泣いていた事だけは記憶している。</td> | |
</tr> | |
<tr> | |
<td class="lc">坊っちゃん</td> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<!-- 左カラム(固定幅)、右カラム(可変幅) --> | |
<div class="parent"> | |
parent | |
<div class="sample2"> | |
<div class="lc">吾輩は猫である</div> | |
<div class="rc">吾輩は猫である。名前はまだ無い。<br>どこで生れたかとんと見当がつかぬ。何でも薄暗いじめじめした所でニャーニャー泣いていた事だけは記憶している。</div> | |
<div class="lc">坊っちゃん</div> | |
<div class="rc">親譲りの無鉄砲で小供の時から損ばかりしている。小学校に居る時分学校の二階から飛び降りて一週間ほど腰を抜かした事がある。</div> | |
<div class="clear"></div> | |
</div> |
OlderNewer