<div class="card">
<img class="banner" src='https://images.unsplash.com/photo-1493106641515-6b5631de4bb9?crop=entropy&cs=tinysrgb&fit=max&fm=jpg&ixid=MnwxNDU4OXwwfDF8cmFuZG9tfHx8fHx8fHx8MTY0MTUxNzk2Mw&ixlib=rb-1.2.1&q=80&w=400' alt='clay art'>
<img class="profile-img" src='https://images.unsplash.com/photo-1609010697446-11f2155278f0?crop=entropy&cs=tinysrgb&fit=max&fm=jpg&ixid=MnwxNDU4OXwwfDF8cmFuZG9tfHx8fHx8fHx8MTY0MTUxODQxNw&ixlib=rb-1.2.1&q=80&w=400' alt=''>
<h3 class="name">John Doe</h3>
<p class="first-para">Brooklyn tacos scenester forage four dollar toast kinfolk hoodie everyday carry chia pabst intelligentsia small batch hella coloring book messenger bag.</p>
<p><span class="first_text">Hi I'm Javascript, you might know me from the web</span></p>
<p><span class="second_text"> Just kidding I'm actually CSS.</span></p>
</div>
@import url('https://fonts.googleapis.com/css2?family=Exo+2:wght@200&family=Montserrat:ital,wght@0,200;0,300;0,400;1,200;1,300&family=Mukta:wght@200;300;400;500;600;700;800&display=swap');
*, :before, :after {
box-sizing: border-box;
}
body {
font-family: Mukta, sans-serif;
background-color: #efffed;
}
.card {
position: relative;
left: 200px; right: 200px;
border: 1px solid gray;
border-radius: 8px;
max-width: 350px;
overflow: hidden;
text-align: center;
margin: 60px;
background-color: #000;
color: #fff;
box-shadow: rgba(0, 0, 0, 0.3) 0px 19px 38px, rgba(0, 0, 0, 0.22) 0px 15px 12px;
}
.banner {
object-fit: cover;
}
.profile-img {
/* to create rounded img*/
position: absolute;
height: 60px;
width: 60px;
object-fit: cover; /*cover to prevent border cut off*/
border-radius: 50%;
overflow: hidden;
position: relative;
bottom: 45px;
}
.name {
font-size: 32px;
font-weight: 450;
letter-spacing: .5px;
position: relative;
bottom: 80px;
line-height: 1;
}
.first-para {
position: relative;
bottom: 100px;
font-weight: 300;
font-size: 15px;
padding: 5px; margin: 5px;
}
/*button {
left: 2px;
top: 485px;
position: absolute;
cursor: pointer;
border-radius: 5px;
} */
@keyframes caret {
0%, 100% {
opacity: 0;
}
50%{
opacity: 1;
}
}
@keyframes text1 {
0%, 50%, 100% {
width: 0;
}
10%, 40% {
width: 22.1em;
}
}
@keyframes text2 {
0%, 50%, 100% {
width: 0;
}
60%, 90%{
width: 20em;
}
}
.first_text {
animation: text1;
color: #f1f1f1;
}
.second_text {
animation: text2;
color: #f1f1f1;
}
.first_text, .second_text {
overflow: hidden;
white-space: nowrap;
position: absolute;
display: inline-block;
animation-duration: 20s;
animation-timing-function: steps(25, end);
animation-iteration-count: infinite;
}
.first_text::after, .second_text::after {
content: "|";
position: absolute;
right: 0;
animation: caret infinite;
animation-duration: 1s;
animation-timing-function: steps(1, end);
}
This Pen doesn't use any external CSS resources.
This Pen doesn't use any external JavaScript resources.