This file contains hidden or 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
<html> | |
<head> | |
<style> | |
<link href="smartphone.css" rel="stylesheet" type="text/css" media="only screen and (min-width: 0px) and (max-width: 320px)" /> | |
<link href="tablet.css" rel="stylesheet" type="text/css" media="only screen and (min-width: 321px) and (max-width: 768px)" /> | |
<link href="tablet.css" rel="stylesheet" type="text/css" media="only screen and (min-width: 769px)" /> | |
</head> | |
<body> | |
</body> | |
</tml> |
This file contains hidden or 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
/** | |
* <meta name="viewport" content="width=device-width, initial-scale=1.0, user-scalable=no, minimum-scale=1.0, maximum-scale=1.0" /> | |
**/ | |
#foo { | |
margin: 0 auto; | |
min-width: 769px; | |
max-width: 980px; | |
} | |
#bar { |
This file contains hidden or 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
<h1>Modal Window</h1> | |
<ul style="list-style: none"> | |
<li><a href="images/photo1.jpg" class="modal"><img src="images/photo1_thum.jpg" alt="写真1" /></a></li> | |
<li><a href="images/photo2.jpg" class="modal"><img src="images/photo2_thum.jpg" alt="写真2" /></a></li> | |
<li><a href="images/photo3.jpg" class="modal"><img src="images/photo3_thum.jpg" alt="写真3" /></a></li> | |
</ul> |
This file contains hidden or 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
/* | |
* カレンダー出力関数 | |
* @param $id 投稿ID | |
* @param $y 年 数字4桁 | |
* @param $m 月 数字1~13 | |
* @param $days 日付 配列 添え字[1~31] 値[空, close, holiday] | |
*/ | |
function drawCalender ($id, $y, $m, $days) { | |
// $y 年 $m 月 | |
$t = mktime(0, 0, 0, $m, 1, $y); //$y年$m月1日のUNIXTIME |
This file contains hidden or 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
/** | |
* create file | |
*/ | |
function createFile($dir, $file) { | |
$html = <<<HTML | |
<!DOCTYPE HTML>'; | |
<html lang="en">'; | |
<head> | |
<meta charset="UTF-8"> | |
<title></title> |
This file contains hidden or 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
<?php | |
// exampleデータベースにfield1, field2を持つtable1テーブルを作成済みの前提 | |
// データベース接続情報 | |
$url = "localhost"; | |
$user = "root"; | |
$password = ""; | |
$database = "example"; | |
// データベース接続処理 | |
$connect = mysql_connect($url,$user,$password) or die("can't connect"); | |
$db = mysql_select_db($database,$connect) or die("can't Select database"); |
This file contains hidden or 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 id="hoge"> | |
<p>Foo</p> | |
<p>Bar</p> | |
</div> | |
<div><button id="botton">Click</button></div> |
This file contains hidden or 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
<!DOCTYPE HTML> | |
<html lang="ja"> | |
<head> | |
<meta charset="UTF-8"> | |
<meta name="robots" content="index,follow" /> | |
<meta name="keywords" content=""> | |
<meta name="description" content=""> | |
<title>HTML5 Template</title> | |
<link rel="shortcut icon" href="/favicon.ico"> | |
<link rel="index" href="/"> |
This file contains hidden or 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 changeDate(str) { | |
var myDate = new Date(str); | |
var YYYY = myDate.getFullYear(); | |
var MM = myDate.getMonth() + 1; | |
if (MM < 10) { | |
MM = "0" + MM; | |
} | |
var DD = myDate.getDate(); | |
if (DD < 10) { |
This file contains hidden or 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
var randomSlide = { | |
// property | |
ulArr: null, | |
totalSlide : 0, | |
currentSlide : 0, | |
isCompletedArr : [false,false,false,false,false,false], | |
// method | |
init : function(){ | |
this.ulArr = $("#randomSlide ul"); | |
this.totalSlide = this.ulArr.length; |