Skip to content

Instantly share code, notes, and snippets.

@nishinoshake
nishinoshake / readme.txt
Created January 25, 2016 13:43
Visibility:hiddenの不思議
visibility: hiddenはレイアウトへの影響を残す。 具体的には次の3つ。
・要素の表示領域を残す
 「要素が生成するボックスのみ残り、要素自体は無くなる」と考えると分かりやすい
・要素の表示域が空白になる。
 クリックなどのマウスイベントを受け付けなくなる。
・子孫要素を表示可
 visibility: visibleを指定することで、指定の子孫要素以下を可視化できる。
 他の要素への影響を残す
 
@nishinoshake
nishinoshake / .gitignore
Created January 26, 2016 11:13
gitignoreの書き方
###################
# Myself
###################
.gitignore
###################
# WordPress
###################
**/wp-content/uploads/
@nishinoshake
nishinoshake / readme.css
Last active October 16, 2016 02:09
remの指定
/* remのrootはhtml */
html {
font-size: 62.5%
}
@nishinoshake
nishinoshake / date.php
Last active May 29, 2016 04:27
時刻関連のすべて
//現在の日付を取得する,第2引数を省略するとtime()が初期値
$date = date("Y/m/d H:i:s");
Y 2016 y 16
m 09 n 9
d 07 j 7
I Monday D Mon w 1(曜日番号,0~6)
H 14 h 02 (hour)
i 18 (minutes)
s 07 (second)
@nishinoshake
nishinoshake / createDB.sql
Last active November 24, 2016 03:49
mysqlで新規DBの作成とか
/**
* create datebase utf-8
* 文字コードを指定してDB作成
*/
CREATE DATABASE dbname CHARACTER SET utf8;
@nishinoshake
nishinoshake / preventScroll.js
Last active May 29, 2016 05:14
JSでPCのスクロール禁止
$('body').on({'mousewheel': function(e) { return false; }});
$('body').off('mousewheel');
@nishinoshake
nishinoshake / login.sh
Last active May 29, 2016 04:26
mysqlのコンソールログイン
mysql -u root -p
@nishinoshake
nishinoshake / show.sql
Last active May 29, 2016 05:13
mysqlの確認コマンドのいろいろ
//DBの確認
SHOW DATABASES;
//Tableの確認
SHOW TABLES;
//使うDBを変える
USE dbname;
@nishinoshake
nishinoshake / cannotLongin.sql
Last active May 29, 2016 05:13
mysqlにログイン出来ない時
// そもそもパスワードがrootじゃなくてadminかも
mysql -u admin -p
@nishinoshake
nishinoshake / linear_gradiation.css
Last active May 29, 2016 04:24
CSSで上下に線形グラディエーションのマスク
.sample {
background-image: linear-gradient(to top, rgba(255, 255, 255, 0), rgba(255, 255, 255, .8)), linear-gradient(to bottom, rgba(255, 255, 255, 0), rgba(255, 255, 255, .8));
background-repeat: no-repeat, no-repeat;
background-position: center top, center bottom;
-webkit-background-size: 100% 100px;
background-size: 100% 100px;
}