.item[data-aos="fade-up"] { // Y方向への移動が伴うfade-upアニメーションの場合 transform: translateY(10px); // ここで移動距離を設定 transition-property: transform, opacity; opacity: 0; &.aos-animate { transform: translateY(0px); // アニメーション後は元の位置に戻す opacity: 1; } } .item[data-aos="fade-left"] { // X方向への移動が伴うfade-upアニメーションの場合 transform: translateX(400px); // ここで移動距離を設定 transition-property: transform, opacity; opacity: 0; &.aos-animate { transform: translateX(0px); // アニメーション後は元の位置に戻す opacity: 1; } }