logo
down
shadow

A CSS animation of a SVG Images 'fill' property not working in Safari


A CSS animation of a SVG Images 'fill' property not working in Safari

By : user2949243
Date : November 16 2020, 06:23 AM
this will help I'm trying to create a CSS animation for the fill color of a specific part of a SVG image. For that I'm using keyframes and an 'id' to link the animation and the SVG rectangle. You can see a working example here: , You could use the animate element instead.
code :
<svg id="logo" x="0" y="0" width="150" viewBox="12.304 3.974 74.952 22.051" enable-background="new 12.304 3.974 74.952 22.051">
  <rect id="laukia"
        x="56.74"
        y="23.094"
        width="17.895"
        height="2.932"
        fill="black" />
  <animate xlink:href="#laukia"
           attributeType="XML"
           attributeName="fill"
           from="red" to="rosybrown"
           values="red; blue; green; teal; saddlebrown; peru; plum; rosybrown"
           repeatCount="indefinite"
           dur="5s" />
</svg>


Share : facebook icon twitter icon
CSS3 Animation: Forwards fill not working with position and display on Safari

CSS3 Animation: Forwards fill not working with position and display on Safari


By : huntastikus
Date : March 29 2020, 07:55 AM
Hope this helps As Suggested in the comments, you can adjust the height.
EDIT: Animation Reference Links Added.
code :
$('.block').click(function() { $(this).toggleClass('active') });
@-webkit-keyframes impressum-fade-out {
  0% {
    opacity: 1;
  }
  99% {
    opacity: 0;
  }
  100% {
    opacity: 0;
    height:0;  
  }
}

.block {
  width: 100px;
  height: 100px;
  background: blue;
}

.block2 {
  width: 100px;
  height: 100px;
  background: red;    
}

.block.active {
  -webkit-animation-name: impressum-fade-out;
        animation-name: impressum-fade-out;
  -webkit-animation-duration: 500ms;
        animation-duration: 500ms;
  -webkit-animation-fill-mode: forwards;
        animation-fill-mode: forwards;
}
<script src="https://ajax.googleapis.com/ajax/libs/jquery/1.9.1/jquery.min.js"></script>
<div class="block"></div>
<div class="block2"></div>
css animation only working in safari

css animation only working in safari


By : Retacu
Date : March 29 2020, 07:55 AM
seems to work fine The problem is with your animation delay. I'm not sure if it's bugged or as specification, but it doesn't work if you don't pass a unit, not even for zero.
code :
-webkit-animation-delay: 0s, 3s;
CSS Animation Not working in Safari

CSS Animation Not working in Safari


By : Tayyab
Date : March 29 2020, 07:55 AM
I wish this helpful for you Use just need to add vendor specific css tranfsorm property i.e. wherever (all the places) you have included transform , add two lines of css as follows:
code :
@-o-keyframes inner-circle {

    0% {
        transform: rotate(0deg);
        -ms-transform: rotate(0deg); /* added vendor specific css (IE) */
        -webkit-transform: rotate(0deg); /* added vendor specific css (Safari, Opera , Chrome) */
    }
    5% {
        transform: rotate(0deg);
        -ms-transform: rotate(0deg);/* added vendor specific css (IE) */
        -webkit-transform: rotate(0deg);/* added vendor specific css (Safari, Opera , Chrome) */
    }
    90% {
        transform: rotate(360deg);
        -ms-transform: rotate(360deg);/* added vendor specific css (IE) */
        -webkit-transform: rotate(360deg);/* added vendor specific css (Safari, Opera , Chrome) */
    }
    100% {
        transform: rotate(360deg);
        -ms-transform: rotate(360deg);/* added vendor specific css (IE) */
        -webkit-transform: rotate(360deg);/* added vendor specific css (Safari, Opera , Chrome) */
    }
}
Safari animation not working

Safari animation not working


By : Ostap Nagovitsyn
Date : March 29 2020, 07:55 AM
will help you to @Joseph Silber previous answer in a previous answer I managed to get it working simply by changing the outline colour not the entire outline (see below).
code :
@-webkit-keyframes blink {
    0% {
        outline-color: transparent;
    }

    50% {
        outline-color: red;
    }

    100% {
        outline-color: transparent; 
    }
}

@keyframes blink {
    0% {
        outline-color: transparent;
    }

    50% {
        outline-color: red;
    }

    100% {
        outline-color: transparent; 
    }
}

*.highlight {
    animation: blink normal 1.5s infinite ease-in-out;

    -webkit-animation-name: blink;
    -webkit-animation-duration: 1.5s;
    -webkit-animation-iteration-count: infinite;
    -webkit-animation-timing-function: ease-in-out;

    outline: 5px solid red;

    box-sizing: border-box;
}
How do i get my svg's to fill in the window height like images do with this codepen animation. (Greensock js)

How do i get my svg's to fill in the window height like images do with this codepen animation. (Greensock js)


By : Nico
Date : March 29 2020, 07:55 AM
like below fixes the issue offsetHeight is a property exclusive to HTML elements, in particular it's not something that SVG elements have.
The simplest thing is probably to wrap the elments in an html element and have the animation target the html wrapper element instead. Like this...
code :
<div class="icon cloud">
<svg>
  <use xlink:href="#donut2"></use>
</svg>
</div>
Related Posts Related Posts :
  • display bootstrap popovers outside divs with overflow:hidden
  • How to make a non responsive site by using Bootstrap?
  • Selecting an element that doesn't have a child with a certain class
  • Embedded Twitter Widget Height issue
  • Twitter Bootstrap - How to get buttons to be block level only on extra small and small devices
  • How can I add a vertical scrollbar to my div automatically?
  • Trouble changing the link font color using typography.js in gatsby
  • Nesting up scss with main.scss and subcomponent scss files
  • Why does my FontSquirrel font not work?
  • Div positioning (overlays when not wanted)
  • Align button vertically in alert field
  • CSS: display: flex and text ellipsis on the same element
  • Fixed position buttons appearing in incorrect area depending on browser
  • CSS-menu issue in angular project
  • Responsive Website - general enquiries
  • Webkit Scrollbar Buttons only showing horizontal
  • explicitly set a field's width in css to "no-auto"
  • Jekyll accessing page variables from CSS
  • Why did my #wrapDesktopNavBar disappear on desktop view?
  • CSS Menu Multiple Hover Colo(u)rs
  • Line-height works differently on Mac and Windows
  • Resizing an image at will with CSS?
  • CSS Naming Best Practice in MVC Layouts
  • FireFox & Chrome CSS Differs
  • Gradient Border Causing the Border to Disappear
  • How to hide column label on google chart
  • How to change H3 color in bootstrap using CSS file
  • CSS How to align checkbox image
  • css3 jagged edge on left isntead of right
  • display text in a horizontal line , using ng-repeat and bootstrap
  • Css right top corner
  • Bootstrap keep button other border gradient when removing border-left
  • Getting divs in the right postion
  • Rails 4: Sass raises SyntaxError when precompiling assets on server but not on development computer
  • Boostrap css file overrode my css file
  • Why are placeholder selectors inside @keyframes valid .scss?
  • Create a 4x4 responsive grid of squares with a margin of 20px on each side of the container?
  • CSS Not Selector: Select All Except Inside of Element
  • CSS Intellisense for files not in solution
  • Overlapping Anchor Tags When Hovering Over One
  • Any way to keep Susy from changing font-size automatically?
  • In Chrome’s user agent stylesheet, why use "-webkit-margin-before" et al instead of just "margin-top"
  • Responsive slanted border
  • SCSS variables - same name, different value in different media breakpoints
  • How to create overlay over div without defining it in HTML
  • Using negative values fails the execution in SASS
  • up/down arrow key issue with typeahead control (angular bootstrap UI)
  • increase size of search terms in a magento site by applying css class-name
  • Inline elements not collapsing whitespace before the end of the tag, in modern browsers?
  • Avoid outline of button when clicked
  • How to add a repeating png image in the background of a webpage using CSS?
  • Heading text displaying at the center instead of displaying in the statring line in asp.net application
  • Div fixation with his mother
  • Sentence is not taking /n
  • Wordpress mobile devices logo resize
  • Why a div with higher z-index is not visible (covered)?
  • HTML5 How to align a table to center inside a form?
  • Why is my clip-path not working when it's source is an svg?
  • Flex-box sticky footer with inner flex-box container with y axis scrolling
  • css3 jagged edge with transparent bg
  • shadow
    Privacy Policy - Terms - Contact Us © ourworld-yourmove.org