Text pop-up effects implemented with CSS3

Text pop-up effects implemented with CSS3

Achieve results

Implementation Code

html

<div>123WORDPRESS.COM</div> 
<div> 
  <span>https://www.jb51.net</span>
</div>


<p>a css3 animation demo</p>

CSS3

@import url('https://fonts.googleapis.com/css?family=Roboto:300');

body {
  text-align:center;
  background: linear-gradient(141deg, #ccc 25%, #eee 40%, #ddd 55%);
  color:#555;
  font-family:'Roboto';
  font-weight:300;
  font-size:32px;
  padding-top:40vh;
  height:100vh;
  overflow:hidden;
  -webkit-backface-visibility: hidden;
  -webkit-perspective: 1000;
  -webkit-transform: translate3d(0,0,0);
}

div {
  display:inline-block;
  overflow:hidden;
  white-space:nowrap;
}

div:first-of-type { /* For increasing performance 
                       ID/Class should've been used. 
                       For a small demo 
                       it's okaish for now */
  animation: showup 7s infinite;
}

div:last-of-type {
  width:0px;
  animation: reveal 7s infinite;
}

div:last-of-type span {
  margin-left:-355px;
  animation: slidein 7s infinite;
}

@keyframes showup {
    0% {opacity:0;}
    20% {opacity:1;}
    80% {opacity:1;}
    100% {opacity:0;}
}

@keyframes slidein {
    0% { margin-left:-800px; }
    20% { margin-left:-800px; }
    35% { margin-left:0px; }
    100% { margin-left:0px; }
}

@keyframes reveal {
    0% {opacity:0;width:0px;}
    20% {opacity:1;width:0px;}
    30% {width:355px;}
    80% {opacity:1;}
    100% {opacity:0;width:355px;}
}


p {
  font-size:12px;
  color:#999;
  margin-top:200px;
}

The above is the details of the text pop-up effects implemented by CSS3. For more information about CSS3 text pop-up effects, please pay attention to other related articles on 123WORDPRESS.COM!

<<:  MySQL database terminal - common operation command codes

>>:  Implementation of textarea adaptive height solution in Vue

Recommend

CentOS 8 officially released based on Red Hat Enterprise Linux 8

The CentOS Project, a 100% compatible rebuild of ...

Website design should pay attention to the sense of color hierarchy

Recently I have been saying that design needs to h...

React Routing Link Configuration Details

1. Link's to attribute (1) Place the routing ...

Detailed tutorial on installing Docker on CentOS 8.4

Table of contents Preface: System Requirements: I...

Ubuntu 19.10 enables ssh service (detailed process)

It took me more than an hour to open ssh in Ubunt...

Detailed explanation of JS ES6 coding standards

Table of contents 1. Block scope 1.1. let replace...

How to run Hadoop and create images in Docker

Reinventing the wheel, here we use repackaging to...

Linux system to view CPU, machine model, memory and other information

During system maintenance, you may need to check ...

Native JS to implement paging click control

This is an interview question, which requires the...

JavaScript realizes the generation and verification of random codes

The generation and verification of random codes i...

Three examples of blur background effects using CSS3

Let’s not start with the introduction and get str...

How to set a fixed IP address in CentOS7 virtual machine

Since my development environment is to install Ce...

Talk about implicit conversion in MySQL

In the course of work, you will encounter many ca...