I use http://daneden.me/animate
.animated {
-webkit-animation-duration: 1s;
animation-duration: 1s;
-webkit-animation-fill-mode: both;
animation-fill-mode: both;
}
for animations to work.
Look the html.
<div class="caption slideOne">
<div class="capionImage animated"></div>
<h1 class="captionTitle animated">Salty Spa <span class="captionSpan animated">Someseni</span></h1>
<div class="breakLine animated"></div>
<p class="captionParagraph animated">Terapii saline de inalta calitate si relaxare intr-o atmosfera placuta<br>alaturi de familia ta.</p><br><br><br>
Afla mai multe
</div>
How can I include all in animated class withouth put in every class "animated"
. slideOne * {
-webkit-animation-duration: 1s;
animation-duration: 1s;
-webkit-animation-fill-mode: both;
animation-fill-mode: both;
}
<div class="caption slideOne">
<div class="capionImage"></div>
<h1 class="captionTitle">Salty Spa <span class="captionSpan">Someseni</span></h1>
<div class="breakLine"></div>
<p class="captionParagraph">Terapii saline de inalta calitate si relaxare intr-o atmosfera placuta<br>alaturi de familia ta.</p><br><br><br>
Afla mai multe
</div>
use this:
.slideOne * {
//csscode
}
Related
I have a little problem when i try to add wow fadeInUp (https://wowjs.uk/docs) animation on my website. I have
overflow set to scroll in my css and it seems to disable the effects of the animation. There is a reason why i had it on scroll so i was wondering if there is a way to make it work with overflow: scroll;
Here is the website for more details: https://admiring-khorana-ad08d5.netlify.app/
.webContainer{
max-height: 100vh;
overflow: scroll;
}
<div class="webContainer">
<div class="grid-container">
<div class="grid-item text wow fadeInUp" data-wow-duration="3s"><img class="services-icon img" src="./icons/services/s1.png" alt=""> <a
class="servicesTag" href="">Acupuncture</a><br>
<div class="serv-description">
Cette pratique constitue tout acte de stimulation, généralement au
moyen d’aiguilles, de certains sites déterminés sur la peau.
</div>
</div>
<div class="grid-item text wow fadeInUp" data-wow-duration="3s"> <img class="services-icon img" src="./icons/services/s2.png" alt=""> <a
class="servicesTag" href="">Kinésiologie</a><br>
<div class="serv-description">
Le kinésiologue est le professionnel de la santé expert en activité
physique. Il vous accompagne dans l’adoption et le maintien d’un
style de vie sain et actif. Ce professionnel peut aussi vous aider à
perdre du poids. Les programmes d’entraînement conçus par les
kinésiologues peuvent aussi aider les personnes souffrant de
problèmes chroniques.
</div>
</div>
...
var wow = new WOW();
wow.init();
I'm not really sure of what you are talking about but you can use #keyframes fadeIn to make animations. Example:
p:hover {
animation: fadeIn 3.1s;
}
#keyframes fadeIn {
from{opacity: 0;}
to{opacity: 1;}
}
<div>
<p>Hello</p>
</div>
Does that answer your question
Solved it by using Jquery
if (scrolled > 25 && scrolled < 50) {
jQuery('.grid-item, .services-image').each(function(i) {
setTimeout(()=>{
$(this).show().addClass('animated fadeInUp')
}, 250 * i);
});
I have a div wrapping a thumb img. I applied an effect to scale and rotate the img when hovering the div. The problem is the div has a bootstrap class with padding-left, padding-right and when the image scales it removes that paddings, increasing the width of the image. How I can keep the paddings? You can see the example in the middle of the page of: https://lagaleramagazine.es
Example of 1 of the item:
.pt-cv-1-col img {
-moz-transition: all 0.7s;
-webkit-transition: all 0.7s;
transition: all 0.7s;
}
.pt-cv-1-col:hover img {
-moz-transform: rotate(10deg) scale(1.3);
-webkit-transform: rotate(10deg) scale(1.3);
transform: rotate(10deg) scale(1.3);
}
<div id="event-56092" class="ect-list-post ect-featured-event data-parent-post-id=" 56053""="">
<div class="ect-list-post-left ">
<div class="ect-list-img" style="background-image:url('https://www.lagaleramagazine.es/wp-content/uploads/2019/01/50008823_1936412149789348_6701274349090897920_n-1024x715.jpg');background-size:cover;background-position:center center;">
<a href="https://www.lagaleramagazine.es/agenda/vi-escuelas-deportivas-para-mayores/2019-02-25/" title="Imagen del evento" alt="Magazine 1" rel="bookmark">
<div class="ect-list-date">
<div class="ect-date-area default-schedule">
<span class="ev-day">25</span>
<span class="ev-mo">febrero</span>
<span class="ev-yr">2019</span>
</div>
</div>
</a>
</div>
</div>
<div class="ect-list-post-right">
<div class="ect-list-post-right-table">
<div class="ect-list-description">
<h2 class="ect-list-title">
<a class="ect-event-url" href="https://www.lagaleramagazine.es/agenda/vi-escuelas-deportivas-para-mayores/2019-02-25/" title="VI Escuelas Deportivas para Mayores" rel="bookmark">VI Escuelas Deportivas para Mayores</a>
</h2>
<button class="btn1 button-more svg">Más detalles</button>
<div class="p1" style="display: none;">
<div class="ect-event-content">
<p>Desde el lunes 21 de enero y hasta el martes 18 de junio, todos los socios de los Centros Municipales de Mayores que participan en la XXIII Campaña de Atención al Mayor, podrán inscribirse en las diferentes actividades de la VI Escuelas Deportivas para mayores. Se impartirán clases de pádel, tenis de mesa, petanca, rutas...</p>
Ir al evento »
</div>
</div>
</div>
<div class="p1-venue">
<div class="ect-list-venue default-venue">
<span class="ect-icon">
<i class="fa fa-map-marker" aria-hidden="true"></i>
</span>
<span class="ect-venue-details ect-address">
Area de atención al Mayor , Ayuntamiento de Badajoz,
<span class="tribe-address">
<span class="tribe-locality">Badajoz</span>
<span class="tribe-delimiter">,</span>
<abbr class="tribe-region tribe-events-abbr" title="Badajoz">Badajoz</abbr>
<span class="tribe-country-name">España</span>
</span>
</span>
<span class="ect-google">
<a class="tribe-events-gmap" href="https://maps.google.com/maps?f=q&source=s_q&hl=en&geocode=&q=Badajoz+Badajoz+Espa%C3%B1a" title="Click para ver mapa de Google" target="_blank">+ Google Map</a>
</span>
<div class="ect-rate-area">
<span class="ect-rate-icon">
<i class="fa fa-money" aria-hidden="true"></i>
</span>
<span class="ect-rate">Gratuito</span>
</div>
</div>
</div>
</div>
</div>
</div>
Using below code, I am able to highlight the element with value 2 and 3 instead of element 3. I tried using last child and nth-last-type but didn't work as expected. Issue is with highlighting immediate next element of class - active and apply blink to both tick mark of 3 and value 3 and change of active class to change blink
No Jquery solution, as currently trying to implement using CSS3
I am trying to choose first element of class hightlight without active class using CSS only
HTML:
<head>
<title>Bootstrap Example</title>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1">
<link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/css/bootstrap.min.css">
<script src="https://ajax.googleapis.com/ajax/libs/jquery/3.1.1/jquery.min.js"></script>
<script src="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/js/bootstrap.min.js"></script>
<script src="https://ajax.googleapis.com/ajax/libs/angularjs/1.4.8/angular.min.js"></script>
</head>
<div class="steps" style="width:26%;float:left">
<div class="stepSection">
<table>
<tr><td><div class="highlight active"><span class="glyphicon glyphicon glyphicon-ok"></span></div></td><td>1.</td><td> <span>one</span></td></tr>
<tr><td><div class="highlight active" ><span class="glyphicon glyphicon glyphicon-ok"></span></div></td><td>2.</td><td> <span>two</span></td></tr>
<tr><td><div class="highlight"><span class="glyphicon glyphicon glyphicon-ok"></span></div> </td><td>3.</td><td><span>three</span></td></tr>
<tr><td><div class="highlight"><span class="glyphicon glyphicon glyphicon-ok"></span></div> </td><td>3.</td><td><span>four</span></td></tr>
</table>
</div>
</div>
<div style="width:2%;float:left;">
<div class="highlight active">1</div>
<div class="highlight active">2</div>
<div class="highlight">3</div>
<div class="highlight">4</div>
</div>
CSS3:
.highlight{
color:white;
width:20px;
height:20px;
border-radius:50%;
background: rgb(234,116,0);
display: inline-block;
text-align: center;
}
.active{
background:green;
}
#keyframes blink {
to { background: rgb(234,116,0); }
}
.active + .highlight{
color: white;
background: white;
animation: blink 2s steps(2, start) infinite;
}
Method 1: Jquery
You can do it using jquery like so
$(".active:last").next().addClass("blink")
And change your css to have blink class
.blink {
color: white;
background: white;
animation: blink 2s steps(2, start) infinite;
}
Working Js fiddle
Method 2:
If you want to do it only using css , you need to book keep your last element
by adding a class to the last element say .last
<div style="width:2%;float:left;">
<div class="highlight active">1</div>
<div class="highlight active last">2</div>
<div class="highlight">3</div>
<div class="highlight">4</div>
</div>
and then do you css like
.last + .highlight {
color: white;
background: white;
animation: blink 2s steps(2, start) infinite;
}
Method 3:
change your css to
div.active + div:not(.active){
color: white;
background: white;
animation: blink 2s steps(2, start) infinite;
}
Basically it finds the element which has class active before it and the next class which does not have the class active.
working jsfiddle
Instead of nth-last-type you may use:
.highlight + .highlight:not(.active):nth-of-type(3) {
The snippet:
.highlight {
color: white;
width: 20px;
height: 20px;
border-radius: 50%;
background: rgb(234, 116, 0);
display: inline-block;
text-align: center;
}
.active {
background: green;
}
#keyframes blink {
to {
background: rgb(234, 116, 0);
}
}
.highlight + .highlight:not(.active):nth-of-type(3) {
color: white;
background: white;
animation: blink 2s steps(2, start) infinite;
}
<link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/css/bootstrap.min.css">
<script src="https://code.jquery.com/jquery-2.1.1.min.js"></script>
<script src="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/js/bootstrap.min.js"></script>
<div class="steps" style="width:26%;float:left">
<div class="stepSection">
<table>
<tr>
<td>
<div class="highlight active"><span class="glyphicon glyphicon glyphicon-ok"></span></div>
</td>
<td>1.</td>
<td><span>one</span></td>
</tr>
<tr>
<td>
<div class="highlight active"><span class="glyphicon glyphicon glyphicon-ok"></span></div>
</td>
<td>2.</td>
<td><span>two</span></td>
</tr>
<tr>
<td>
<div class="highlight"><span class="glyphicon glyphicon glyphicon-ok"></span></div>
</td>
<td>3.</td>
<td><span>three</span></td>
</tr>
<tr>
<td>
<div class="highlight"><span class="glyphicon glyphicon glyphicon-ok"></span></div>
</td>
<td>3.</td>
<td><span>four</span></td>
</tr>
</table>
</div>
</div>
<div style="width:2%;float:left;">
<div class="highlight active">1</div>
<div class="highlight active">2</div>
<div class="highlight">3</div>
<div class="highlight">4</div>
</div>
This is the html content I want to add.
These are 4 verticals of my firm and they have individual clients and I want the logo of these clients yo appear in the same box moving downwards shifting the remaining text downward and the logo gallery running downward.
<div class="box1">
<div class="box1_bot">
<div class="box1_top">
<div class="pad" >
<h2>CLIENTS</h2>
<ul>
<li>Consultants4manpower</li>
<li>Corporate Training</li>
<li>English and PD Training</li>
<li>Career Counselling</li>
</ul>
</div>
</div>
</div>
</div>
<html>
<head>
<script>
function show_logo_home(){
var loc = document.getElementById("logo");
var linknews = document.getElementById("news");
var linkcontact = document.getElementById("contact");
var linkabout = document.getElementById("about");
loc.style.visibility="visible";
loc.style.marginTop="-227";
linknews.style.marginTop="150";
}
</script>
<style>
#logo {
background-color: #F00;
height: 150px;
width: 150px;
margin-left: 30px;
position: absolute;
visibility:hidden;}
</style>
</head>
<body>
<div class="box1">
<div class="box1_bot">
<div class="box1_top">
<div class="pad" >
<h2>CLIENTS</h2>
<ul>
<li >Consultants4manpower</li>
<li id="news">Corporate Training</li>
<li id="contact">English and PD Training</li>
<li id="about">Career Counselling</li>
</ul>
</div>
</div>
</div>
</div>
<div id="logo"></div>
</body>
</html>
<div id="demo"></div>
<button id="btn"onclick="popup()">click me</button>
<style>
#demo {
-webkit-transition: all 2s ease 0s;
-o-transition: all 2s ease 0s;
-moz-transition: all 2s ease 0s;
transition: all 2s ease 0s;
height: 0px;
width: 0px;
}
</style>
<script>
function popup(){
document.getElementById('demo').style.cssText='height:500px; width:500px;background-color:red;position:absolute;'
document.getElementById('demo').style.marginLeft=250;
document.getElementById('demo').style.marginTop=50;
}
</script>
I am getting parser error when I try to use CSS animations.
Server Error in '/' Application.
Parser Error
Description: An error occurred during the parsing of a resource required to service this request. Please review the following specific parse error details and modify your source file appropriately.
Parser Error Message: "-" is not valid at the start of a code block. Only identifiers, keywords, comments, "(" and "{" are valid.
<html>
<head>
.spin {
-webkit-animation: spin .2s infinite linear;
-moz-animation: spin .2s infinite linear;
-o-animation: spin .2s infinite linear;
animation: spin .2s infinite linear;
-webkit-transform-origin: 50% 58%;
transform-origin: 50% 58%;
-ms-transform-origin: 50% 58%; /* IE 9 */
}
#-moz-keyframes spin {
from {
-moz-transform: rotate(0deg);
}
to {
-moz-transform: rotate(360deg);
}
}
#-webkit-keyframes spin {
from {
-webkit-transform: rotate(0deg);
}
to {
-webkit-transform: rotate(360deg);
}
}
#keyframes spin {
from {
transform: rotate(0deg);
}
to {
transform: rotate(360deg);
}
}
</style>
</head>
<body>
<h1 class="text-center">
<span class="glyphicon glyphicon-refresh spin"></span>
<span class="glyphicon glyphicon-record spin"></span>
<span class="glyphicon glyphicon-send spin"></span>
<span class="glyphicon glyphicon-star spin"></span>
</h1>
<h3 class="text-center">
<span class="glyphicon glyphicon-refresh spin"></span>
<span class="glyphicon glyphicon-record spin"></span>
<span class="glyphicon glyphicon-send spin"></span>
<span class="glyphicon glyphicon-star spin"></span>
</h3>
<h6 class="text-center">
<span class="glyphicon glyphicon-refresh spin"></span>
<span class="glyphicon glyphicon-record spin"></span>
<span class="glyphicon glyphicon-send spin"></span>
<span class="glyphicon glyphicon-star spin"></span>
</h6>
</body>
</html>
Add <style type="text/css"> just below the head tag and above your CSS code. It looks like you have the closing tag at the bottom already.