原森情報技術研究所 WEBコンテンツ企画・制作・運営・サポート / 兵庫県 神戸市 明石市 /

transition-duration

transition (トランジション) / transition-durationをいろいろ指定してみる実験

transition設定のサンプル

例1

-0.5s
0s
0.1s
0.2s
0.3s
0.4s
0.5s
0.6s
0.7s
0.8s
0.9s
1.0s

白枠にマウスホバーで10個のdivブロックの長さが300px(又は150px)になる

例2

1.00s
1.01s
1.02s
1.03s
1.04s
1.05s
1.06s
1.07s
1.08s
1.09s
1.10s

変化する時間の差が0.01s

例3

1.000
1.001
1.002
1.003
1.004
1.005
1.006
1.007
1.008
1.009
1.010
1.015
1.020

変化する時間の差が0.001s

サンプル例の内容

【例1】
親div(白い枠)にマウスホバーで青いdiv(width:30px)が
[transition-property : width] 、[transition-timing-function : linear] で、
transition-duration を 0s、0.1s、0.2s … 1.0s にしたものがそれぞれ変化するサンプルです。
※ 1s (1秒)が案外長い印象です。(個人的な感想です)
※ マイナス秒を試して見ると 0s と同じ動作になりました。(赤色のバー)

【例2】小数点下2ケタを実験してみました。
1.00s 1.01s 1.02s 1.03s 1.04s 1.05s 1.06s 1.07s 1.08s 1.09s 1.10s
微妙な0.01sの差も並べてみればちゃんと計算されてるようです。(FF,GCで確認)

【例3】小数点下3ケタを実験してみました。
1.000s 1.001s 1.002s 1.003s 1.004s 1.005s 1.006s 1.007s 1.008s 1.009s 1.010s (青)と 1.015s 1.020s (赤)
0.001sの差は微妙すぎて差がないようにみえますが、0.005s (赤色)ならかすかな違いが感じられる印象ですので、ちゃんと計算はされているかと思います。

transitionのプロパティ

transition-property CLICK
transition-duration CLICK
変化する時間を指定。1s 等と指定。0は通常のマウスホバーと同じですぐ変化(初期値=0)。
transition-timing-function CLICK
transition-delay CLICK

ページトップへ

top > css3研究 > 
transition-duration

Text

color

font font-size font-size-adjust font-stretch font-weight

letter-spacing

line-height

max-lines

text-decoration-color text-emphasis-color text-indent text-shadow text-size-adjust

vertical-align

word-spacing

Box

background background-color background-image background-position background-size

border border-color border-top-color border-radius border-top-right-radius border-spacing border-top border-width border-top-width

box-shadow

clip

height min-height max-height

margin margin-top

opacity

outline-color outline-offset outline-width

padding padding-top

width min-width max-width

Positioning

top

right

bottom

left

offset-before offset-end offset-after offset-start

visibility

z-index

zoom

Multi-column layout

columns column-count column-gap column-rule column-rule-color column-rule-width column-width

Flexbox

flex flex-grow flex-shrink flex-basis

order

Transforms

perspective

perspective-origin

transform

transform-origin

SVG

fill fill-opacity

flood-color

lighting-color

marker-offset

stop-color stop-opacity

stroke stroke-dasharray stroke-dashoffset stroke-miterlimit stroke-opacity stroke-width

viewport-fill viewport-fill-opacity

カテゴリMENU
お問い合せ