text-shadow: 2px 2px 4px #444;
text-shadow:
0 0 4px #fff,
1px -5px 4px #ff3,
2px -10px 6px #fd3,
-2px -15px 11px #f80,
2px -25px 18px #f20;
background-color: #fff4e0; border-radius: 8px; box-shadow: 4px 4px 4px 2px #ccc;
background-color: #fff4e0; border-radius: 8px; box-shadow: inset 4px 4px 4px 2px #ccc;
background-color: #fff4e0;
border-radius: 8px;
box-shadow:
4px 4px 4px 2px #ccc,
inset 2px 4px 4px 2px #ffe;
background-color: #fff4e0;
border-radius: 8px;
border: 1px solid #876;
box-shadow: inset 4px 6px 20px #fff,
inset -4px -4px 10px #ccbba0,
inset 0 -45px #fec,
0 0 4px #876,
4px 4px 6px 2px #ccc;
background: linear-gradient(#feb, #fb0);
background: linear-gradient( -45deg, #feb, #fb0);
background: linear-gradient( #feb, #fc4 50%, #fb0 51%, #fd9);
background: radial-gradient( center, circle farthest-side, #feb, #fb0);
background: repeating-linear-gradient( -45deg, #feb, #fb0 20px, #feb 40px);
border-image: linear-gradient( #feb, #fb0 100px) 20/20px stretch;
background:
radial-gradient(
center, circle closest-side,
rgba(255, 255, 255, 0),
rgba(255, 255, 255, 0) 90%, white),
url(sample/image01.jpg);
background:
repeating-linear-gradient(
rgba(255, 255, 255, 0.3),
rgba(255, 255, 255, 0.3) 10px,
transparent 10px, transparent 20px),
repeating-linear-gradient(
0deg, rgba(255, 255, 255, 0.3),
rgba(255, 255, 255, 0.3) 10px,
transparent 10px, transparent 20px),
#44c;
.transition1 {
background: #c44;
transition: background-color 1s;
}
.transition1:hover {
background: #44c;
}
.transition2 {
background: #c44;
width: 100px;
transition:
background-color 1s, width 1s;
}
.transition2:hover {
background: #44c;
width: 200px;
}
.transition3 {
background: #c44;
width: 100px;
transition:
background-color 0.5s linear 0.5s,
width 1s linear;
}
.transition3:hover {
background: #44c;
width: 200px;
}
<div style="background: #c44;
width:100px; height:80px;
transition: width 1s;"
onclick="this.style.width='200px';">
</div>
.animation1 {
animation: anim1 4s infinite;
}
@keyframes anim1 {
0%, 100% { left:0px; }
50% { left:280px; }
}
.animation2 {
animation: anim2 4s ease-in infinite;
}
@keyframes anim2 {
0% { left:0px; }
50% { left:280px;
animation-timing-function:ease-out; }
100% { left:0px; }
}
.animation3 div {
animation: anim3 4s infinite;
animation-play-state: paused;
}
.animation3:hover div {
animation-play-state: running;
}
@keyframes anim3 {
0%, 100% { left:0px; }
50% { left:280px; }
}
.animation4 {
animation:
anim4-1 0.5s infinite ease-out alternate,
anim4-2 4s infinite linear alternate;
}
@keyframes anim4-1 {
0% { top:50px; }
100% { top:0px; }
}
@keyframes anim4-2 {
0% { left:0px; }
100% { left:280px; }
}
@keyframes tf1 {
0%, 100% { transform:translateX(0); }
50% { transform:translateX(280px); }
}
@keyframes tf2 {
0% { transform:rotate(0);
animation-timing-function:linear; }
100% { transform:rotate(360deg); }
}
@keyframes tf3 {
0%, 100% { transform:scale(2, 0.5); }
50% { transform:scale(0.5, 2); }
}
@keyframes tf4 {
0%, 100% { transform:skewX(-45deg); }
50% { transform:skewX(+45deg); }
}
.transform6 {
animation: tf6 4s infinite;
transform-origin: left top;
}
@keyframes tf6 {
0% { transform:rotate(0);
animation-timing-function:linear; }
100% { transform:rotate(360deg); }
}
@keyframes tf5 {
0% {
transform:translateX(0) rotate(0);
animation-timing-function:linear;
}
50% {
transform:translateX(260px) rotate(180deg);
animation-timing-function:linear;
}
100% {
transform:translateX(0) rotate(360deg);
}
}
<style>
.transform7 {
width:20px; height:20px; background:#c44;
}
@keyframes tf7-1 {
0% { transform:translateX(40px) rotate(0); }
100% { transform:translateX(40px) rotate(360deg); }
}
@keyframes tf7-2 {
0% { transform:rotate(0) translateX(40px); }
100% { transform:rotate(360deg) translateX(40px); }
}
</style>
<div class="transform7" style="animation: tf7-1 4s infinite linear;
margin:20px auto;"></div>
<div class="transform7" style="animation: tf7-2 4s infinite linear;
margin:50px auto;"></div>
<style>
.t8 {
width:8px; height:40px; background:#c44;
animation:tf8 4s infinite;
transform-origin:center top;
}
@keyframes tf8 {
0%, 100% { transform:translateY(40px) rotate(-20deg); }
50% { transform:translateY(40px) rotate(+20deg); }
}
</style>
<div class="t8"> <!-- 根本の節 -->
<div class="t8"> <!-- 2番目の節 -->
<div class="t8"> <!-- 3番目の節 -->
<div class="t8"></div> <!-- 先端の節 -->
</div>
</div>
</div>
@keyframes tf9 {
0% {
transform:rotateX(60deg) rotateZ(0);
animation-timing-function:linear;
}
100% {
transform:rotateX(60deg) rotateZ(360deg);
}
}
<style>
.transform10 {
width:80px; height:80px;
background:url(image.jpg);
/* キーフレームは前のものを流用 */
animation:tf9 4s infinite;
}
</style>
<div style="perspective:100px;">
<div class="transform10"></div>
</div>
<style>
.t13-outer { perspective:100px; }
.t13-parent {
margin:0 auto; width:80px; height:80px;
background:url(image.jpg);
animation: tf9 4s infinite; /* 「3Dの回転」のキーフレームを参照 */ }
.t13-child {
width:40px; height:40px; background:#c44;
transform:translateZ(10px); /* 子要素を10px手前に移動 */ }
</style>
<div class="t13-outer">
<div class="t13-parent"><div class="t13-child"></div></div>
</div>
<div class="t13-outer">
<div class="t13-parent" style="transform-style:preserve-3d;">
<div class="t13-child"></div>
</div>
</div>