CSS animation アニメGIF風のアイコン IE非対応
HTML
<span class="new">New</span>
CSS
.new { display: inline-block; * display: inline ; * zoom: 1; background-color: #f10 ; color: #FFF ; -webkit-animation: blink 1.5s ease-in-out infinite alternate; -moz-animation: blink 1.5s ease-in-out infinite alternate; -ms-animation: blink 1.5s ease-in-out infinite alternate; -o-animation: blink 1.5s ease-in-out infinite alternate; animation: blink 1.5s ease-in-out infinite alternate; } @-webkit-keyframes blink { 0% {opacity: 0.2;} 100% {opacity: 1;} } @-moz-keyframes blink { 0% {opacity: 0.2;} 100% {opacity: 1;} } @-ms-keyframes blink { 0% {opacity: 0.2;} 100% {opacity: 1;} } @-o-keyframes blink { 0% {opacity: 0.2;} 100% {opacity: 1;} } @keyframes blink { 0% {opacity: 0.2;} 100% {opacity: 1;} }
デモ demo
New
IEは10以上なので使うの無理だな・・・
http://caniuse.com/css-animation
jQuery版 js
$(function(){ setInterval(function(){ $('.ico_new').animate( {opacity:0.2, duration:1000}, {complete:function(){ $('.ico_new').animate({opacity:1, duration:1000}) }} ); }, 3000); })
デモ2 demo2
New
php sessionの有効期限について
phpinfo()のセッション項目
session 有効期限
; After this number of seconds, stored data will be seen as 'garbage' and ; cleaned up by the garbage collection process. session.gc_maxlifetime = 1440
1440秒保存されガベージコレクションの処理によって削除される。
; Defines the probability that the 'garbage collection' process is started ; on every session initialization. The probability is calculated by using ; gc_probability/gc_divisor. Where session.gc_probability is the numerator ; and gc_divisor is the denominator in the equation. Setting this value to 1 ; when the session.gc_divisor value is 100 will give you approximately a 1% chance ; the gc will run on any give request. session.gc_probability = 1 session.gc_divisor = 1000
ガベージコレクションはセッションスタートした時にgc_probability/gc_divisorの確立で起動する。
gc_probability = 1 で session.gc_divisor = 100 の場合1%の確率で削除される。
アクセスが多いページだとほぼ24分でセッション切れるよな・・・
IE6 7 でinline-blockを使う
li { display: inline-block; *display: inline; *zoom: 1; }
スターハック(IE6 7のみ)
haslayout(バグ対策)
これでOK
CakePHP2.x SQLのログを出力
参考サイト
http://d.hatena.ne.jp/aroundthedistance/20120319/1332150248 http://memo.mkmin.com/cakephp/?p=7
ログ書き出し
ログの出力が$this->log(sprintf("%s",$sql),'sql');ででなかったので下記に変更してみた。
CakeLog::write(6, $sql);