Loading effect in HTML CSS for text - html

I have seen some site using an effect for line of text loading. I have searched a lot but unable to find what is called.
Effect:
Does any plugin or css file for this effect like bootstrap.
I know this question is kind of silly but i have no idea where to ask this question i have search about where to ask question Html/CSS.

This is close to something you want. It's done only with CSS/HTML and you can easily customize it for your taste
https://jsfiddle.net/hau122w8/
<div class="timeline-item">
<div class="animated-background">
<div class="background-masker content-first"></div>
<div class="background-masker content-top"></div>
<div class="background-masker content-first-end"></div>
<div class="background-masker content-second-line"></div>
<div class="background-masker content-second-end"></div>
<div class="background-masker content-third-line"></div>
<div class="background-masker content-third-end"></div>
</div>
</div>
.timeline-item {
background-color: #fff;
border: 1px solid;
border-color: #ddd;
border-radius: 3px;
padding: 12px;
margin: 0 auto;
}
#keyframes placeHolderShimmer {
0% {
background-position: 0 0;
}
100% {
background-position: 10000px 0;
}
}
.animated-background {
animation-duration: 10s;
animation-fill-mode: forwards;
animation-iteration-count: infinite;
animation-timing-function: linear;
animation-name: placeHolderShimmer;
background: #f6f7f8;
background: linear-gradient(to right, #eeeeee 8%, #aacfde 18%, #eeeeee 33%);
height: 96px;
position: relative;
}
.background-masker {
background: #fff;
position: absolute;
}
/* Every thing below this is just positioning */
.background-masker.content-top,
.background-masker.content-second-line,
.background-masker.content-third-line,
.background-masker.content-second-end,
.background-masker.content-third-end,
.background-masker.content-first-end {
top: 40px;
left: 0;
right: 0;
height: 6px;
}
.background-masker.content-first {
height: 10px;
top: 15px;
left: 0;
right: 0;
}
.background-masker.content-top {
height: 20px;
}
.background-masker.content-first-end,
.background-masker.content-second-end,
.background-masker.content-third-end {
width: auto;
left: 380px;
right: 0;
top: 60px;
height: 8px;
}
.background-masker.content-second-line {
top: 68px;
}
.background-masker.content-second-end {
left: 420px;
top: 74px;
}
.background-masker.content-third-line {
top: 82px;
}
.background-masker.content-third-end {
left: 300px;
top: 88px;
}

Related

How do I make the center of rotation of this '::before' pseudoelement change?

I'm trying to make an animated border for a div. I unhid the overflow of its formatting element so that I could see what the issue was. I'd like to make the center of rotation the center of the larger div.
I know I can make the center of rotation higher by setting the width and height of the before psuedoelement to that of its container, but I want to make it taller because if I set the width and height to its formatting element, it's too small and doesn't cover the edges.
I've tried using CSS positioning, but it isn't working and I have no idea why.
<div class="center">
<div class="wrapper">
<div class="directory module">
<div id="header" class="small_wrapper center">
<div class="module">
<p style="font-size: 22px">Placeholder</p>
</div>
</div>
<div class="directory_bar small_wrapper center"><div class="module">About Me</div></div>
<div class="directory_bar small_wrapper center"><div class="module">PC Builds</div></div>
<div class="directory_bar small_wrapper center"><div class="module">Original Characters</div></div>
<div class="directory_bar small_wrapper center"><div class="module">Games & Loadouts</div></div>
<div class="directory_bar small_wrapper center"><div class="module">Socials</div></div>
</div>
</div>
</div>
#charset "utf-8";
#keyframes rotate {
0% {
transform: rotate(0);
}
50% {
transform: rotate(180deg);
}
100% {
transform: rotate(360deg);
}
}
html {
font-size: 3.0vh;
}
body {
background-color: #2C2C2C;
font-family: Urbanist, sans serif;
color: white;
}
p {
margin: 0;
}
.left, .right, .center {
position: relative;
}
.center {
margin-left: auto;
margin-right: auto;
}
.module {
background-color:#2C2C2C;
text-align: center;
padding: 10px;
border-radius: 18px;
z-index: 1000;
position: relative;
}
.wrapper, .small_wrapper {
position: relative;
width: fit-content;
height: fit-content;
background: blue;
z-index: 1000;
}
.wrapper {
border-radius: 20px;
padding: 4px;
}
.wrapper::before {
position: absolute;
top: 0;
right: 0;
bottom: 0;
left: 0;
background: linear-gradient(to right, rgb(255, 0, 0), rgb(145,
255, 0), rgb(189, 1, 180));
animation: rotate;
animation-duration: 3s;
animation-iteration-count: infinite;
animation-timing-function: linear;
content: '';
border-radius: 20px;
height: 1000px;
}
.small_wrapper {
padding: 3px;
}
.directory_bar {
margin-top: 5vh;
}
.directory {
padding: 5vh;
}
.center > .wrapper {
margin-left: 100px;
}
.directory_bar, #header {
border-radius: 8px;
}
.directory_bar > .module, #header > .module {
border-radius: 7px;
}

css media query. cannot center a flex box for mobile device

***Dear all,
for a signup form, i tried to apply media queries rules in order that this flexbox form will appears center and fit the screeen. i have tried different option but i cannot find the solution.
can anyone help please?``
i leave as well my git repository.github project***
how can i make the login form apprearing in center and shrink in case of the screen is small?
<style lang="css" scoped>
.grp-login__grandParentContainer{
display: table;
height: 100%;
background-color:#d7ffd9;
font-size:25px;
margin: 0 auto;
}
.grp-login__parentContainer {
display:table-cell;
background-color:#eaffd7;
background-image: url('~#/assets/logosansnom.png');
height: 50px;
vertical-align: middle;
}
.grp-login__form {
border-style: solid;
border-color: black;
padding: 50px;
}
.grp-login__form__login__button {
width: 220px;
height: 50px;
border: none;
outline: none;
color: #fff;
background: red;
cursor: pointer;
position: relative;
z-index: 0;
border-radius: 10px;
margin: 50px;
font-size: 25px;
}
.grp-login__form__login__button:before {
content: '';
background: linear-gradient(45deg, #ff0000, #ff7300, #fffb00, #48ff00, #00ffd5, #002bff, #7a00ff, #ff00c8, #ff0000);
position: absolute;
top: -2px;
left:-2px;
background-size: 400%;
z-index: -1;
filter: blur(5px);
width: calc(100% + 4px);
height: calc(100% + 4px);
animation: glowing 20s linear infinite;
opacity: 0;
transition: opacity .3s ease-in-out;
border-radius: 10px;
}
.grp-login__form__login__button:active {
color: red;
}
.grp-login__form__login__button:active:after {
background: transparent;
}
.grp-login__form__login__button:hover:before {
opacity: 1;
}
.grp-login__form__login__button:after {
z-index: -1;
content: '';
position: absolute;
width: 100%;
height: 100%;
background: orange;
left: 0;
top: 0;
border-radius: 10px;
}
#keyframes glowing {
0% { background-position: 0 0; }
50% { background-position: 400% 0; }
100% { background-position: 0 0; }
}
#media only screen and (max-width : 1024px) {
.grp-login__grandParentContainer {
display: table;
height: 150px;
background-color:#d7ffd9;
font-size:20px;
margin: 50px;
width: 60%;
}
.grp-login__parentContainer{
text-align:center;
}
}
</style>
<div class="grp-login__grandParentContainer">
<div class="grp-login__parentContainer">
<form class="grp-login__form">
<div class="grp-login__form__email">
<label class="">Email </label>
<input v-model="email" type="email" class="">
</div>
<div class="grp-login__form__password">
<label class="">Mot de passe </label>
<input v-model="password" type="password" class="">
</div>
<div class="grp-login__form__login">
<button #click= "goLogin" type= "button" class="grp-login__form__login__button">Login</button>
</div>
</form>
<div v-if="isError">Erreur de connexion</div>
</div>
</div>

Continuous Scrolling Effect in CSS stopping on first line

I'm trying to create a continuous vertical scroller effect, however having a couple of issues;
The first line appears, without stopping, like the rest of the
line
I can't seem to fade-in or fade-out
For the first point, I've tried adjusting the keyframe at 0%, too many different options and div heights, but haven't got anywhere.
On the second point, i've tried adding from: {opacity: 0.5} and to: {opacity: 0.5}, again to no success.
How do I stop the scrolling effect at the first line, like what happens with the subsequent line and add a fade-in fade-out effect?
JSFiddle: https://jsfiddle.net/ekzvLhmx/
CSS
.tagTextContainer {
text-align: left;
display: inline-flex;
width: 100%;
margin: 5px;
border-bottom: 1px solid #dcdfe5;
}
.tagText {
text-align: left;
color: black;
font-size: 13px;
}
.scrollCont {
font: normal 40px/50px monospace;
float: left;
overflow: hidden;
position: relative;
height: 18px;
top: 0px;
}
.scrollCont .scrollOptions {
font-size: 13px;
display: inline-block;
color: black;
position: relative;
top: 0;
left: 0;
/*animation*/
animation: scroll 10s;
/*animation-iteration-count*/
animation-iteration-count: infinite;
/*animation-delay*/
animation-delay: 1.5s;
}
#keyframes scroll {
0% {
top: 0px;
}
20% {
top: -66px;
}
40% {
top: -116px;
}
60% {
top: -166px;
}
80% {
top: -216px;
}
}
HTML
<div class="tagTextContainer">
<span class="tagText">
Options:
</span>
<div class="scrollCont">
<div class="scrollOptions">
SJDIUNE92323232<br />
FHD_231232_FSD<br />
RUG_12£321231$3<br />
LA21312321_TQ<br />
2132131/232 123
</div>
</div>
</div>
The problem is the first item is a little below what you expect.
I modified your version a little here
<div class="tagTextContainer">
<span class="tagText">
Options:
</span>
<div class="scrollCont">
<div class="scrollOptions">
SJDIUNE92323232<br />
FHD_231232_FSD<br />
RUG_12£321231$3<br />
LA21312321_TQ<br />
2132131/232 123
</div>
</div>
</div>
.tagTextContainer {
text-align: left;
display: inline-flex;
width: 100%;
margin: 5px;
border-bottom: 1px solid #dcdfe5;
}
.tagText {
text-align: left;
color: black;
font-size: 13px;
}
.scrollCont {
font: normal 40px/50px monospace;
float: left;
overflow: hidden;
position: relative;
height: 18px;
top: 0px;
}
.scrollCont .scrollOptions {
font-size: 13px;
display: inline-block;
color: black;
position: relative;
top: 0;
left: 0;
/*animation*/
animation: scroll 10s;
/*animation-iteration-count*/
animation-iteration-count: infinite;
/*animation-delay*/
animation-delay: 1.5s;
}
#keyframes scroll {
16% {
top: -15px;
}
32% {
top: -66px;
}
48% {
top: -116px;
}
64% {
top: -166px;
}
80% {
top: -216px;
}
}

How to add animation to the same element separately in css?

I have a div and I want to apply animation to it.
When Clicked on hamburger icon
When I click on the hamburger menu, it should appear from left to right and it does correctly.
Here it appears like this, with left to right animation
When clicked on left icon
Now When after it appears to the screen, when I click to the leftIcon, it should disappear from right to left.
However, I manage to make the first animation appearing from left to right but I don't know how to add another animation to the same div when the left Icon is pressed.
Code
import React, { useState } from "react";
import { FaBars, FaArrowLeft } from "react-icons/fa";
import "./Sidebar.css";
function Sidebar() {
const [sidebar, setSidebar] = useState(false);
const showHideSidebar = () => {
return setSidebar(!sidebar);
};
return (
<div className="side__bar">
<div className="top__side__bar">
<div className="the__icon" onClick={showHideSidebar}>
<FaBars></FaBars>
</div>
<div className="the__bar__title">DASA</div>
</div>
{sidebar ? (
<div>
<TheSideBar></TheSideBar>
</div>
) : (
<></>
)}
</div>
);
function TheSideBar() {
return (
<div className="the__side__bar">
<div className="left__side__bar">
<div className="the__bar__title">DASA</div>
<div className="the__icon">
<FaArrowLeft onClick={showHideSidebar}></FaArrowLeft>
</div>
</div>
</div>
);
}
}
export default Sidebar;
css
.the__side__bar {
height: 100vh;
-webkit-box-shadow: 0 0 10px rgb(187, 183, 183);
box-shadow: 0 0 10px rgb(187, 183, 183);
width: 300px;
background-color: white;
position: absolute;
animation: mymove 1s;
animation-direction: alternate;
top: 0;
left: 0;
}
#keyframes mymove {
from {
left: -300px;
}
to {
left: 0px;
}
}
How to do that?
You can Add Class with body then you can control sidebar part using css.
const openMenu = () => {
document.body.classList.toggle('sidebar-open');
};
const closeMenu = () => {
document.body.classList.toggle('sidebar-open');
};
CSS
.sidebar {
position: fixed;
width: 300px;
background-color: white;
left: -100%;
top: 0px;
bottom: 0px;
transition: 0.3s ease-in-out 0s;
overflow: auto;
z-index: 9999;
}
.sidebar-open .sidebar {left: 0px;}
When you click on the menu menu items only change the css class.
function toggleMenu() {
$('.spanPos1').toggleClass('rotA45Top');
$('.spanPos3').toggleClass('rotA45Bottom');
$('.sideMenu').toggleClass('showMenu');
$('.btnMenu').toggleClass('btnMenu_Move');
}
* {
padding: 0;
margin: 0;
}
.header {
width: 100%;
background-color: #DDD;
padding: 10px;
}
.sideMenu {
height: 100vh;
-webkit-box-shadow: 0 0 10px rgb(187, 183, 183);
box-shadow: 0 0 10px rgb(187, 183, 183);
width: 300px;
background-color: white;
position: absolute;
transition: all .5s;
top: 0;
left: -300px;
}
.spanLine {
height: 3px;
background-color: #000;
width: 30px;
position: absolute;
transition: all .5s;
}
.spanPos1 {
top: 0px;
left: 0px;
}
.spanPos2 {
top: 10px;
left: 0px;
}
.spanPos3 {
top: 20px;
left: 0px;
}
.btnMenu {
position: relative;
width: 30px;
height: 24px;
background: transparent;
border: none;
transition: all .5s;
}
.rotA45Top {
margin-top: 3px;
transform: rotate(-45deg);
width: 20px;
left: -5px;
}
.rotA45Bottom {
margin-top: -3px;
transform: rotate(45deg);
width: 20px;
left: -5px;
}
.showMenu {
left: 0;
}
.btnMenu_Move {
z-index: 2;
margin-left: 250px;
}
<div class="header">
<div class="btnMenu" onclick="toggleMenu()">
<span class="spanLine spanPos1"></span>
<span class="spanLine spanPos2"></span>
<span class="spanLine spanPos3"></span>
</div>
</div>
<div class="sideMenu"></div>
<script src="https://cdnjs.cloudflare.com/ajax/libs/jquery/3.3.1/jquery.min.js"></script>

Is it possible to handle mouseout on ::after pseudo-class in CSS? [duplicate]

This question already has answers here:
How to animate underline from left to right?
(3 answers)
Closed 2 years ago.
.header-section {
width: calc(100% / 4);
padding: 10px 15px;
user-select: none;
font-family: 'Nourd', sans;
font-size: 1.2em;
text-align: center;
cursor: pointer;
border-radius: 15px;
position: relative;
}
.header-section::after {
content: "";
position: absolute;
bottom: 8%;
left: 25%;
width: 0%;
height: 4px;
border-radius: 6px;
background-image: linear-gradient(135deg, rgb(225, 60, 60), rgb(235, 126, 181));
animation-duration: 500ms;
animation-fill-mode: both;
animation-name: hss-anim-out;
}
.header-section:hover::after {
animation-name: hss-anim-over;
}
#keyframes hss-anim-over {
from {
width: 0%;
}
to {
width: 50%;
}
}
#keyframes hss-anim-out {
from {
left: 25%;
width: 50%;
}
to {
left: 75%;
width: 0%;
}
}
<div class="header-section header-section-selected">importer</div>
<div class="header-section">mes fichiers</div>
This my code to make my question clear.
It does what I want, except it runs the animation "hss-anim-out" when the page loads. I searched how to override this, but I didn't find something which actually works. Does anyone have an idea to do this, considering it is impossible to use JavaScript for the animation because it is on the ::after pseudo-element? Thanks in advance
Don't use animation but transition. An idea using background properties
.header-section {
width: calc(100% / 4);
padding: 10px 15px;
user-select: none;
font-family: 'Nourd', sans;
font-size: 1.2em;
text-align: center;
cursor: pointer;
border-radius: 15px;
position: relative;
}
.header-section::after {
content: "";
position: absolute;
bottom: 8%;
left: 25%;
right: 25%;
height: 4px;
border-radius: 6px;
background-image: linear-gradient(135deg, rgb(225, 60, 60), rgb(235, 126, 181));
background-size: 0% 100%;
background-position:right;
background-repeat: no-repeat;
transition:background-size 0.5s, background-position 0s 0s;
}
.header-section:hover::after {
background-size: 100% 100%;
background-position:left;
}
<div class="header-section header-section-selected">importer</div>
<div class="header-section">mes fichiers</div>