参考URL:http://kachibito.net/web-design/backstretch.html
使用サイト例:http://www.madeinmeproject.co/
2012年3月11日日曜日
2012年3月8日木曜日
MTカスタムフィールドの改行を消す+改行させる。
「MTカスタムフィールドにbrを自動的に入れて改行させる」
下記例
<MTIf tag="caption">
<MTcaption />
</MTIf>
に、nl2br="xhtml"を入れる。
<MTIf tag="caption">
<MTcaption nl2br="xhtml" />
</MTIf>
これで改行される。
他の方法。。
カスタムフィールド表示の記述に
<$mt:cf_hoge$>
以下を入れる。
convert_breaks="0"
<$mt:cf_hoge convert_breaks="0"$>
MovableTypeでカスタムフィールドを作成するとき、
convert_breaksモディファイアを1にすると、
管理画面のフォーマット指定に関係なくp要素とbr要素でマークアップされます。
0にするとプレーンテキストとなります。
参考URLhttp://code1616.net/movabletype/entry-9.html
2012年2月28日火曜日
シンプルでアニメーションの時間も設定できるjQueryスライドショープラグイン
<div id="slideshow">
<img src="img/img1.jpg" width="500" alt="" />
<img src="img/img2.jpg" width="500" alt="" />
<img src="img/img3.jpg" width="500" alt="" />
</div>
<script type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/jquery/1.3.2/jquery.min.js" ></script>
<script type="text/javascript">
function slideSwitch() {
var $active = $('#slideshow img.active');
if ( $active.length == 0 ) $active = $('#slideshow img:last');
var $next = $active.next().length ? $active.next() : $('#slideshow img:first');
$active.addClass('last-active');
$next.css({opacity: 0.0})
.addClass('active')
.animate({opacity: 1.0}, 1000, function() {
$active.removeClass('active last-active');
});
}
$(function() {
setInterval( "slideSwitch()", 4000 );
});
</script>
<img src="img/img1.jpg" width="500" alt="" />
<img src="img/img2.jpg" width="500" alt="" />
<img src="img/img3.jpg" width="500" alt="" />
</div>
<style type="text/css">
<!--
#slideshow {
position:relative;
}
#slideshow img {
position:absolute;
top:0;
left:0;
z-index:8;
}
#slideshow img.active {
z-index:10;
}
#slideshow img.last-active {
z-index:9;
}
-->
</style>
<script type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/jquery/1.3.2/jquery.min.js" ></script>
<script type="text/javascript">
function slideSwitch() {
var $active = $('#slideshow img.active');
if ( $active.length == 0 ) $active = $('#slideshow img:last');
var $next = $active.next().length ? $active.next() : $('#slideshow img:first');
$active.addClass('last-active');
$next.css({opacity: 0.0})
.addClass('active')
.animate({opacity: 1.0}, 1000, function() {
$active.removeClass('active last-active');
});
}
$(function() {
setInterval( "slideSwitch()", 4000 );
});
</script>
2012年2月24日金曜日
2012年2月23日木曜日
2枚の画像を重ねるCSS。(マスクに使用)
白の穴空きpng画像をマスクにつかって
下には正方形の写真を配置。
2つのimg画像をdivでくくって
divにposition:relative;
マスクの方(2枚目の画像)にabsoluteをかける。
参考サイト
下には正方形の写真を配置。
2つのimg画像をdivでくくって
divにposition:relative;
マスクの方(2枚目の画像)にabsoluteをかける。
参考サイト
登録:
投稿 (Atom)





