Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 941587
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 15, 20262026-05-15T22:08:31+00:00 2026-05-15T22:08:31+00:00

I’ve been working on this for some time, but can’t seem to find an

  • 0

I’ve been working on this for some time, but can’t seem to find an adequate solution yet.

The page is XHTML with inline SVG which is animated with ECMAscript once the SVG is finished loading. There is a 0.5s pause, then an eye in the middle opens. It works on Safari, Firefox, and Chrome on MacOS X.

The problem is in Chrome on Windows the animation doesn’t start, and in Opera (on OS X) the animation behaves erratically.

What is going on?!

You can see it live at this page. I’d love to hear your thoughts.

Here are the most relevant bits of code:

<svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" version="1.1"
   viewBox="0 0 1200 800"
   preserveAspectRatio="xMidYMid"
   style="width:100%; height:100%; position:absolute; top:0; left:0; z-index:2;"
   onload="startup(evt);"> 
  <script> 
    function startup(evt){
      setTimeout("doEyeOpen(1200,20);",500);
    }
    function doEyeOpen(dur,msrate) {
      eye=document.getElementById("eyehole");
      var totStep = dur/msrate, step=0;
      window.timer = window.setInterval(
        function() {
          var start=580, d1=start-175.087, d2=624.913-start;
          var prog = easeOut(step,totStep);
          var y2=start-(d1*prog);
          var y1=start+(d2*prog);
          var d="M 1200, 800 H 0 V 0 h 1200 V 800 z M 1183.589 400 C 1037.727 400 813.41 "+y1+" 600 "+y1+" C 386.591 "+y1+" 162.274 400 16.412 400 C 162.274  400 386.591 "+y2+" 600 "+y2+" C 813.41 "+y2+" 1037.727 400 1183.589 400 z";
          eye.setAttribute("d", d);
          step++;
          if (step > totStep) {window.clearInterval(window.timer); return}
        } 
      ,msrate)
    }
    function easeOut(step,totStep){
      return (1 - Math.pow(((step/totStep)-1),8));
    }
  </script> 
  <rect fill="#FFF" x="10" y="10" width="1180" height="780" id="white-bg"/> 
  <g id="Iris"> 
    <circle transform="translate(600, 400)" r="260" fill="#e50000" id="c-iris" onclick="changeColor(evt)" /> 
    <circle transform="translate(600, 400)" r="130" fill="#000" id="c-pupil"/> 
  </g> 
  <g id="Gray"> 
    <path fill="#999999" d="M138.363,397.25c0-90.911,26.295-175.674,71.671-247.127H78.419
          c-35.555,74.909-55.457,158.691-55.457,247.124c0,90.606,20.891,176.329,58.105,252.629h132.529
          C166.042,577.29,138.363,490.509,138.363,397.25z"/> 
    <path fill="#999999" d="M1121.58,150.124H989.963c45.377,71.453,71.671,156.216,71.671,247.127
          c0,93.258-27.68,180.039-75.233,252.626h132.53c37.215-76.3,58.107-162.023,58.107-252.629
          C1177.039,308.815,1157.137,225.033,1121.58,150.124z"/> 
  </g> 
  <clipPath id="CP"
            clip-rule="evenodd"> 
    <path id="eyehole"
          d="M 1200, 800 H 0 V 0 h 1200 V 800 z
          M 1183.589 400 C 1037.727 400 813.41 400.000 600 400.000 C 386.591 400.000 162.274 400 16.412 400
          C 162.274  400 386.591 400.000 600 400.000 C 813.41 400.000 1037.727 400 1183.589 400 z"/> 
  </clipPath> 
  <rect fill="#000" x="0" y="0" width="1200" height="800" id="black-cover" clip-path="url(#CP)"/> 
</svg>
  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-15T22:08:32+00:00Added an answer on May 15, 2026 at 10:08 pm

    The problem in Chrome is not the animation but your clipping path. When you test your image without animation and the final eyehole path, you only see black in Chrome. Somehow the hole isn’t cut out of the black box.

    EDIT: Seems like Chrome can’t render the evenodd clip-rule (you can test here: http://srufaculty.sru.edu/david.dailey/cs427/StateOfArt-Dailey.html#clipPath)

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have a jquery bug and I've been looking for hours now, I can't
For some reason, after submitting a string like this Jack’s Spindle from a text
I have a string like this: La Torre Eiffel paragonata all&#8217;Everest What PHP function
I'm parsing an RSS feed that has an &#8217; in it. SimpleXML turns this
Seemingly simple, but I cannot find anything relevant on the web. What is the
Does anyone know how can I replace this 2 symbol below from the string
I have some data like this: 1 2 3 4 5 9 2 6
link Im having trouble converting the html entites into html characters, (&# 8217;) i
That's pretty much it. I'm using Nokogiri to scrape a web page what has
I have just tried to save a simple *.rtf file with some websites and

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.