Steps to halt webkit animation within a div located inside a circle:

I have a series of nested circle divs, and I want to give them a pulse animation. The issue is that the text container is within one of these circles, causing the animation to apply to the text as well. I am unable to move the text container due to potential complications it may cause. Unfortunately, I cannot share the actual project example due to copyright restrictions. Is there a way to resolve this without adjusting the position of the text?

I attempted the following solution but was unsuccessful in manipulating the inner circle's animation:

.myText{ animation-play-state: paused;}
#first-circle{border-radius:50%;width:643px;height:643px;position:absolute;top:0;left:0;border:1px solid #000;-webkit-animation: pulsate 1s ease-out;-webkit-animation-iteration-count: infinite;}
#second-circle{position:absolute;border-radius:50%;border:1px solid #000;width:508px;height:508px;top:50%;left:50%;margin:-254px 0 0 -254px}
#third-circle{position:absolute;width:382px;height:382px; border:1px solid #000;border-radius:50%;top:50%;left:50%;margin:-191px 0 0 -191px}
#fourth-circle{position:absolute;width:254px;height:254px;border:1px solid #000;border-radius:50%;top:50%;left:50%;margin:-127px 0 0 -127px}
#fifth-circle{position:absolute;font-size:14px;width:128px;height:128px;text-align:center;border:1px solid #000;border-radius:50%;top:50%;left:50%;margin:-64px 0 0 -64px}
.myText{
margin-top:55px;
}
@-webkit-keyframes pulsate {
    0% {-webkit-transform: scale(0.1, 0.1); opacity: 0.0;}
    50% {opacity: 1.0;}
    100% {-webkit-transform: scale(1.2, 1.2); opacity: 0.0;}
}
 <div id="first-circle" >      
        <div id="second-circle" >
          <div id="third-circle" >
            <div id="fourth-circle" >
              <div id="fifth-circle" >
                <div class="myText">
                My Text
                </div>
               </div>
              </div>
            </div>
          </div>
        </div>
     

Answer №1

Revamp it with fewer components.

.box {
  margin:150px;
  display:inline-block;
  position:relative;
}
.box:before {
  content:"";
  position:absolute;
  top:50%;
  left:50%;
  transform:translate(-50%,-50%);
  width:500%;
  padding-top:500%;
  border:2px solid; /* 1 circle here */
  border-radius:50%;
  /* 3 circles here */
  background:
    radial-gradient(farthest-side,transparent 75%,#000 calc(75% + 1px) calc(75% + 2px),transparent calc(75% + 3px)),
    radial-gradient(farthest-side,transparent 50%,#000 calc(40% + 1px) calc(50% + 2px),transparent calc(50% + 3px)),
    radial-gradient(farthest-side,transparent 25%,#000 calc(25% + 1px) calc(25% + 2px),transparent calc(25% + 3px))
    /* to add another circle
    radial-gradient(farthest-side,transparent X%,#000 calc(X% + 1px) calc(X% + 2px),transparent calc(X% + 3px))*/;
  animation:pulsate 1s linear infinite; 
}

@keyframes pulsate {
  0% {
    transform: translate(-50%,-50%) scale(0.1);
    opacity: 0;
  }
  50% {
    opacity: 1;
  }
  100% {
    transform: translate(-50%,-50%) scale(1.2);
    opacity: 0;
  }
}
<div class="box">
  some text
</div>

By reducing the number of nested elements, you'll avoid the outer element's scale effect impacting the inner elements which cannot be disabled in your current situation.

Similar questions

If you have not found the answer to your question or you are interested in this topic, then look at other similar questions below or use the search

What are the various ways to display time zone in a different format?

I need to display the timezone in a unique manner. I have captured the user's timezone in a variable called timeZone, which currently returns the value as Asia/Calcutta. console.log(timeZone) // "Asia/Calcutta" Is there a way to showcase the timezon ...

Creating a cron job that can be rescheduled using Node.js

I am utilizing the node-schedule package from GitHub to create cron jobs. While I have successfully created a basic scheduler, my goal is to make it reschedulable. Within my application, users can initiate tasks for specific dates. This can be easily achi ...

What is the reason behind the blocking of Ajax GET requests without CORS, while JSONP requests are permitted?

Accessing any page on the web through a GET request using HTML tags from a different origin is possible: <script src="http://example.com/user/post?txt=sample"></script> XHR requests to other origins are blocked for security reasons. For examp ...

Having trouble displaying SVG elements in Material UI

Currently, I am faced with an issue while trying to display a .svg file in the header of a drawer using Material-UI and create-react-app. Instead of the expected .svg image, all I see is a broken image rendering. Any assistance on resolving this problem ...

Model of Objects within a Document

Here's a puzzling question for you: why does console.log(document.body) and console.log(document.head) work perfectly fine, but console.log(document.script) or console.log(document.html) don't seem to do anything? It's strange because all of ...

Sauce Labs encountering issues when running JavaScript code

Currently, I am using Selenium WebdriverJs along with Mocha to conduct tests on Sauce Labs via Travis CI. After isolating the issue without any project dependencies, I am seeking help. The interesting observation is that defining an additional object with ...

Halt the execution of any additional code

I have a favor to ask: Character.count({'character.ownerid': msg.author.id}, function (err, count) { if (err) { throw err; } if (count > 3) { err.message = 'Exceeded character limit'; //create error ...

Transforming NodeJS Express HTTP responses into strings for AngularJS consumption

I have been working on creating an AngularJS program that communicates with an Express/Node.js API and a MySQL database. On the login page, I am successfully able to call the API which connects to MySQL. Depending on the correct combination of username an ...

Tips for displaying multiple XML datasets on an HTML webpage

I came across an example on W3schools that I'm trying to replicate: http://www.w3schools.com/xml/tryit.asp?filename=tryxml_app_first However, the example only displays one CD. My goal is to showcase all the data (in this case CDs) in the XML file. H ...

Ajax transmits information but does not yield any response

Can someone help with this HTML code I have? <div class="Likes" data-i=<?php echo $row[8];?>> <img src="../img/like.png"> <p class="L_c"><?php echo $row[4];?></p> </div> And here is the jQuery/Ajax script ...

Include the HTTP header in a GET request for an HTML hyperlink

Within my HTML code, I am using an <a> tag that will trigger a 302 redirect when clicked. However, I need to incorporate some HTTP headers into this GET request. Is there a way to achieve this without including the headers in the href attribute? Tha ...

Leveraging external JSON data in a Jade template with Node.js

Is there a way to successfully pass a Json Object from XMLHttpRequest to my jade file? I am currently experiencing a blank page display and a 500 internal error being sent by the server for the get method. var express = require('express'); var r ...

Mobile Image Gallery by Adobe Edge

My current project involves using Adobe Edge Animate for the majority of my website, but I am looking to create a mobile version as well. In order to achieve this, I need to transition from onClick events to onTouch events. However, I am struggling to find ...

Retrieval of jQuery remove() method

Essentially, I am utilizing an OnClick function to delete a DIV. Once the OnClick is triggered, it invokes the remove() jQuery function to eliminate the div. Below is my code that implements the removal using remove(): <div id="add"> <button typ ...

Eliminate the display of Last Modified date and file Size in mod_autoindex

Recently, while developing a file storage webpage for my website, I successfully implemented mod_autoindex for my Apache server. However, I now face the challenge of removing the Last Modified and Size fields from the table. I am hopeful that there is a w ...

Making a div equal in height to an image

What I currently have is like this... https://i.stack.imgur.com/7FeSi.png However, this is what I am aiming for. https://i.stack.imgur.com/fn9m0.png The image dimensions are set up as follows... #content img{ padding: 3%; width: 60%; height: 50%; floa ...

Utilize Google Home to browse through nearby websites and respond to inquiries by incorporating Javascript

Can Google Home be programmed to read from a local webpage and provide answers based on the content of that page through Javascript? ...

Anticipating the completion of multiple observable subscription functions

Is there a way to replace and convert all words in an array using an object's method that returns an observable? I found a helpful solution on this post which uses bind to pass the correct value. After all subscriptions are complete, I want to execut ...

Is reduced range causing a decrease in speed in jQuery?

Check out my jsfiddle example here: http://jsfiddle.net/2tfbs/1/ Despite the smaller scope for 'find' in the bottom loop, why is the speed significantly slower? Changing jQuery versions shows a performance drop (especially in Firefox 5) from 1.4 ...

Troubleshooting a timing loop problem with jQuery Ajax and setInterval when using flipCounter's onAnimationStopped feature

In the code below, I am retrieving some data to use for a counter. The problem is that after the initial page load and one interval, things start to go haywire. The calls are made without any delay and the counter cannot react before the next call is made. ...