Below is a segment from an SVG file featuring a hyphen character.
<path class="right-eye" fill="#000000" d="m556.02527 384.85477l11.03009 -4.0496826l12.407532 33.71103l-11.03009 4.0496826l-12.407532 -33.71103z" fill-rule="nonzero"></path>
I am looking to create an animation resembling an eye blink on this part of the SVG, resulting in the shape shown below.
<path fill="#000000" d="m593.09674 394.5932l3.4421997 10.035461l-30.647644 10.530273l-3.4421387 -10.035431l30.647583 -10.530304z" fill-rule="nonzero"></path>
Using only CSS, I have been unsuccessful in achieving the desired effect. I want to start by creating one "blink," and then progress to timing multiple blinks for a natural appearance. The entire SVG shape will involve "blinking" the left and right eyes simultaneously. Unfortunately, as a novice, I lack further detail to provide at this time.
<svg version="1.1" viewBox="0.0 0.0 960.0 720.0" fill="none" stroke="none" stroke-linecap="square" stroke-miterlimit="10" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink">
<clipPath id="p.0">
<path d="m0 0l960.0 0l0 720.0l-960.0 0l0 -720.0z" clip-rule="nonzero"></path>
</clipPath>
<g clip-path="url(#p.0)">
... (omitted for brevity)
<path class="right-eye" fill="#000000" d="m556.02527 384.85477l11.03009 -4.0496826l12.407532 33.71103l-11.03009 4.0496826l-12.407532 -33.71103z" fill-rule="nonzero"></path>
</g>
</svg>
After experimenting more with SMIL, here is an updated snippet:
<svg version="1.1" viewBox="0.0 0.0 960.0 720.0" fill="none" stroke="none" stroke-linecap="square" stroke-miterlimit="10" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink">
... (omitted for brevity)
<path class="right-eye" fill="#000000" d="m556.02527 384.85477l11.03009 -4.0496826l12.407532 33.71103l-11.03009 4.0496826l-12.407532 -33.71103z" fill-rule="nonzero">
I am uncertain if it’s feasible, but ideally, I'd like each eye blink to occur randomly at timed intervals. Alternatively, I aim for a sequence similar to this pattern:
blink.........blink.blink..............blink......blink.
While I am unsure how to execute these looping animations currently, my learning journey tonight has been enlightening! :)