1
2

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

More than 5 years have passed since last update.

cssアニメーション

Last updated at Posted at 2019-05-30

下からすすーっと出てくる奴

メモ帳か何かに.htmlで張り付ければ見れる

<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <meta http-equiv="X-UA-Compatible" content="ie=edge">
    <title>Document</title>
</head>
<style>
/* 下から上にススーっとフェードイン */

span{
    display: block;
}
.aaa{
    position: absolute;
    top: 0px;
    right: 0px;
    left: 0px;
    bottom: 0px;
    margin: auto;

    background:#2561c1;
    color: #fff;
    width: 400px;
    height: 100px;
    text-align: center;
}
.sample-text1 {
    font-size: 20px;
    font-weight: bold;
    animation-name: fadein;
    animation-duration: 2s;
    animation-iteration-count: 1;
}
@keyframes fadein {
from {
    opacity: 0;
    transform: translateY(20px);
}
to {
    opacity: 1;
    transform: translateY(0);
}
}

</style>
<body>
    <div class="aaa">
        <p class="sample-text1">
            『自由』にモノづくりを。
        
            <span>なんかもう一文</span>
        </p>
    </div>
</body>
</html>
1
2
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
1
2

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?